Skip to content

Commit 8c1505d

Browse files
committed
test: uncomment test case from #506
1 parent 858fcd4 commit 8c1505d

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

regression-tests/pure2-bugfix-for-ufcs-name-lookup.cpp2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ ns: namespace = {
1212
f: (_) -> int == 1;
1313
} // namespace ns
1414

15-
// v: @struct type = {
16-
// f :== :(_) 0; // Pending on #706.
17-
// g: (i) i.f();
18-
// }
15+
v: @struct type = {
16+
f :== :(_) 0;
17+
g: (i) i.f();
18+
}
1919

2020
main: () = {
2121
{

regression-tests/test-results/pure2-bugfix-for-ufcs-name-lookup.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ namespace ns {
2222

2323
}
2424

25+
class v;
26+
2527

2628
//=== Cpp2 type definitions and function declarations ===========================
2729

@@ -41,10 +43,10 @@ namespace ns {
4143
[[nodiscard]] constexpr auto f([[maybe_unused]] auto const& unnamed_param_1) -> int;
4244
} // namespace ns
4345

44-
// v: @struct type = {
45-
// f :== :(_) 0; // Pending on #706.
46-
// g: (i) i.f();
47-
// }
46+
class v {
47+
public: static constexpr auto f = []([[maybe_unused]] auto const& unnamed_param_1) mutable -> auto { return 0; };
48+
public: [[nodiscard]] static auto g(auto const& i) -> auto;
49+
};
4850

4951
auto main() -> int;
5052

@@ -63,6 +65,9 @@ namespace ns {
6365
[[nodiscard]] constexpr auto f([[maybe_unused]] auto const& unnamed_param_1) -> int { return 1; }
6466
}
6567

68+
#line 17 "pure2-bugfix-for-ufcs-name-lookup.cpp2"
69+
[[nodiscard]] auto v::g(auto const& i) -> auto { return CPP2_UFCS(f)(i); }
70+
6671
#line 20 "pure2-bugfix-for-ufcs-name-lookup.cpp2"
6772
auto main() -> int{
6873
{

0 commit comments

Comments
 (0)