Skip to content

Commit 177bb13

Browse files
committed
Repeat #1103 in main to fix missing it in the .. merge...
1 parent 9648191 commit 177bb13

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

regression-tests/test-results/pure2-ufcs-member-access-and-chaining.cpp

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,43 @@
88

99
#line 1 "pure2-ufcs-member-access-and-chaining.cpp2"
1010

11+
#line 48 "pure2-ufcs-member-access-and-chaining.cpp2"
12+
class mytype;
13+
1114

1215
//=== Cpp2 type definitions and function declarations ===========================
1316

1417
#line 1 "pure2-ufcs-member-access-and-chaining.cpp2"
1518
[[nodiscard]] auto main() -> int;
1619

17-
#line 26 "pure2-ufcs-member-access-and-chaining.cpp2"
20+
#line 29 "pure2-ufcs-member-access-and-chaining.cpp2"
1821
auto no_return([[maybe_unused]] auto const& unnamed_param_1) -> void;
1922

2023
[[nodiscard]] auto ufcs(cpp2::impl::in<int> i) -> int;
2124
using fun_ret = int;
2225

2326

24-
#line 32 "pure2-ufcs-member-access-and-chaining.cpp2"
27+
#line 35 "pure2-ufcs-member-access-and-chaining.cpp2"
2528
[[nodiscard]] auto fun() -> fun_ret;
2629

27-
#line 37 "pure2-ufcs-member-access-and-chaining.cpp2"
30+
#line 40 "pure2-ufcs-member-access-and-chaining.cpp2"
2831
[[nodiscard]] auto get_i(auto const& r) -> int;
2932

30-
#line 41 "pure2-ufcs-member-access-and-chaining.cpp2"
33+
#line 44 "pure2-ufcs-member-access-and-chaining.cpp2"
3134
// And a test for non-local UFCS, which shouldn't do a [&] capture
3235
[[nodiscard]] auto f([[maybe_unused]] auto const& unnamed_param_1) -> int;
3336
extern int y;
3437

38+
class mytype {
39+
public: static auto hun(cpp2::impl::in<int> i) -> void;
40+
public: mytype() = default;
41+
public: mytype(mytype const&) = delete; /* No 'that' constructor, suppress copy */
42+
public: auto operator=(mytype const&) -> void = delete;
43+
44+
#line 50 "pure2-ufcs-member-access-and-chaining.cpp2"
45+
};
46+
47+
3548
//=== Cpp2 function definitions =================================================
3649

3750
#line 1 "pure2-ufcs-member-access-and-chaining.cpp2"
@@ -59,30 +72,36 @@ extern int y;
5972
CPP2_UFCS(no_return)(42);
6073

6174
CPP2_UFCS(no_return)(cpp2::move(res));
75+
76+
mytype obj {};
77+
cpp2::move(obj).hun(42);// explicit non-UFCS
6278
}
6379

64-
#line 26 "pure2-ufcs-member-access-and-chaining.cpp2"
80+
#line 29 "pure2-ufcs-member-access-and-chaining.cpp2"
6581
auto no_return([[maybe_unused]] auto const& unnamed_param_1) -> void{}
6682

67-
#line 28 "pure2-ufcs-member-access-and-chaining.cpp2"
83+
#line 31 "pure2-ufcs-member-access-and-chaining.cpp2"
6884
[[nodiscard]] auto ufcs(cpp2::impl::in<int> i) -> int{
6985
return i + 2;
7086
}
7187

72-
#line 32 "pure2-ufcs-member-access-and-chaining.cpp2"
88+
#line 35 "pure2-ufcs-member-access-and-chaining.cpp2"
7389
[[nodiscard]] auto fun() -> fun_ret{
7490
cpp2::impl::deferred_init<int> i;
75-
#line 33 "pure2-ufcs-member-access-and-chaining.cpp2"
91+
#line 36 "pure2-ufcs-member-access-and-chaining.cpp2"
7692
i.construct(42);
7793
return std::move(i.value());
7894
}
7995

80-
#line 37 "pure2-ufcs-member-access-and-chaining.cpp2"
96+
#line 40 "pure2-ufcs-member-access-and-chaining.cpp2"
8197
[[nodiscard]] auto get_i(auto const& r) -> int{
8298
return r;
8399
}
84100

85-
#line 42 "pure2-ufcs-member-access-and-chaining.cpp2"
101+
#line 45 "pure2-ufcs-member-access-and-chaining.cpp2"
86102
[[nodiscard]] auto f([[maybe_unused]] auto const& unnamed_param_1) -> int { return 0; }
87103
int y {CPP2_UFCS_NONLOCAL(f)(0)};
88104

105+
#line 49 "pure2-ufcs-member-access-and-chaining.cpp2"
106+
auto mytype::hun(cpp2::impl::in<int> i) -> void{}
107+

0 commit comments

Comments
 (0)