diff options
| author | Yong He <yonghe@outlook.com> | 2025-10-01 09:23:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-01 16:23:48 +0000 |
| commit | 5793b6d864b572e464dd5e17dc842e99d13d310d (patch) | |
| tree | 18c67a633385f5db5d9fc673d99ee4b39d42e705 /tests/front-end/link-time-struct-same-line.slang | |
| parent | 4d241f2ccc2b07673615e94ea8e99060cf2da66c (diff) | |
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.
Diffstat (limited to 'tests/front-end/link-time-struct-same-line.slang')
| -rw-r--r-- | tests/front-end/link-time-struct-same-line.slang | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
