From 8a31d1b54f27fdcdc279e51bbf6cbb7291a95786 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 28 Oct 2024 22:15:34 -0500 Subject: [PATCH] Add test for trailing return. --- Source/Engine/Tests/TestScripting.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Engine/Tests/TestScripting.h b/Source/Engine/Tests/TestScripting.h index dc05750e1..476060b0b 100644 --- a/Source/Engine/Tests/TestScripting.h +++ b/Source/Engine/Tests/TestScripting.h @@ -172,6 +172,12 @@ public: return str.Length(); } + // Test trailing return type + API_FUNCTION() auto TestTrailingReturn(int32 number) -> float + { + return static_cast(number); + } + int32 TestInterfaceMethod(const String& str) override { return str.Length();