Skip to content

Commit 2a0628b

Browse files
committed
Change return to void in singleton test case
1 parent 98f5721 commit 2a0628b

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

regression-tests/pure2-singleton-and-static.cpp2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
test: @singleton type = {
33
value: int = 42;
4-
print: (this) = std::cout << "(value)$\n";
4+
print: (this) = { std::cout << "(value)$\n"; }
55
}
66

77
main: () = {

regression-tests/test-results/cpp2_post_build.sh

Whitespace-only changes.

regression-tests/test-results/gcc-14-c++2b/pure2-singleton-and-static.cpp.output

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35721 for x64
1+
Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35722 for x64
22
Copyright (C) Microsoft Corporation. All rights reserved.
33

regression-tests/test-results/pure2-singleton-and-static.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class test;
1919
#line 2 "pure2-singleton-and-static.cpp2"
2020
class test {
2121
private: int value {42};
22-
public: [[nodiscard]] auto print() const& -> decltype(auto);
22+
public: auto print() const& -> void;
2323
private: explicit test();
2424
public: [[nodiscard]] static auto instance() -> test&;
2525

@@ -36,7 +36,7 @@ auto main() -> int;
3636
#line 1 "pure2-singleton-and-static.cpp2"
3737

3838
#line 4 "pure2-singleton-and-static.cpp2"
39-
[[nodiscard]] auto test::print() const& -> decltype(auto) { return std::cout << "" + cpp2::to_string(value) + "\n"; }
39+
auto test::print() const& -> void{std::cout << "" + cpp2::to_string(value) + "\n"; }
4040

4141
test::test(){}
4242
[[nodiscard]] auto test::instance() -> test&{

0 commit comments

Comments
 (0)