From 5793b6d864b572e464dd5e17dc842e99d13d310d Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 1 Oct 2025 09:23:48 -0700 Subject: Misc parser improvements. (#8563) - Fix bug parsing multiple link-time structs on the same line. Closes #8553. - Fix bug parsing anonymous struct type as function return type in modern syntax. Closes #8558 - Support semantics on modern style param/var declarations. --- tests/front-end/link-time-struct-same-line.slang | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/front-end/link-time-struct-same-line.slang (limited to 'tests/front-end/link-time-struct-same-line.slang') diff --git a/tests/front-end/link-time-struct-same-line.slang b/tests/front-end/link-time-struct-same-line.slang new file mode 100644 index 000000000..790e1e165 --- /dev/null +++ b/tests/front-end/link-time-struct-same-line.slang @@ -0,0 +1,9 @@ +// Check that we can correctly parse link-time struct definitions on the same line. +// There was a bug where the parser is expecting an identifier after `struct` definition, +// even if the struct is a link-time struct ending with a `;`. + +//TEST:SIMPLE: -target slangvm + +interface IFoo{} +struct FooImpl : IFoo{} +export struct Foo1 : IFoo = FooImpl; export struct Foo2 : IFoo = FooImpl; \ No newline at end of file -- cgit v1.2.3