File tree 2 files changed +13
-8
lines changed
2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ ns: namespace = {
12
12
f: (_) -> int == 1;
13
13
} // namespace ns
14
14
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
+ }
19
19
20
20
main: () = {
21
21
{
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ namespace ns {
22
22
23
23
}
24
24
25
+ class v ;
26
+
25
27
26
28
// === Cpp2 type definitions and function declarations ===========================
27
29
@@ -41,10 +43,10 @@ namespace ns {
41
43
[[nodiscard]] constexpr auto f ([[maybe_unused]] auto const & unnamed_param_1) -> int;
42
44
} // namespace ns
43
45
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
+ };
48
50
49
51
auto main () -> int;
50
52
@@ -63,6 +65,9 @@ namespace ns {
63
65
[[nodiscard]] constexpr auto f ([[maybe_unused]] auto const & unnamed_param_1) -> int { return 1 ; }
64
66
}
65
67
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
+
66
71
#line 20 "pure2-bugfix-for-ufcs-name-lookup.cpp2"
67
72
auto main () -> int{
68
73
{
You can’t perform that action at this time.
0 commit comments