Skip to content

Commit cd7cb99

Browse files
JohelEGPthreeifbyair
authored andcommitted
test: make reproducer compilable
1 parent 6f16a23 commit cd7cb99

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

regression-tests/pure2-bugfix-for-nested-lists.cpp2

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ main: () = {
2727
}
2828

2929
issue_1283: () = {
30-
arr: std::array<std::string, 10> = ();
31-
f: MyFunctor = ("Some initial value");
32-
std::ranges::generate(arr, :() (f&$*)());
30+
f := :() = { };
31+
_ = :() = (f&$*)();
3332
}

regression-tests/test-results/pure2-bugfix-for-nested-lists.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ auto main() -> int{
8989

9090
#line 29 "pure2-bugfix-for-nested-lists.cpp2"
9191
auto issue_1283() -> void{
92-
std::array<std::string,10> arr {};
93-
MyFunctor f {"Some initial value"};
94-
std::ranges::generate(cpp2::move(arr), [_0 = (&f)]() mutable -> auto { return (*cpp2::impl::assert_not_null(_0))(); });
92+
auto f {[]() -> void{}};
93+
static_cast<void>([_0 = (&f)]() mutable -> void { (*cpp2::impl::assert_not_null(_0))(); });
9594
}
9695

0 commit comments

Comments
 (0)