From 7bfb95cc1079b14e5b8fb41bf83f8ccacab98411 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:15:20 +0200 Subject: [PATCH] Update testclass.cpp --- test/testclass.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/testclass.cpp b/test/testclass.cpp index a0e52a94bcf..b0ffbb6b550 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -8980,7 +8980,12 @@ class TestClass : public TestFixture { "struct D : B {\n" " std::string f() override { return s; }\n" " std::string s;\n" - "}"); + "};\n"); + ASSERT_EQUALS("", errout_str()); + + checkReturnByReference("struct S {\n" + " std::string f(std::string s) { return s; }\n" + "};\n"); ASSERT_EQUALS("", errout_str()); } };