diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-26 17:00:31 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-26 17:00:31 -0800 |
| commit | 39522159c245e32a99cfdc47f03236f7028f5c61 (patch) | |
| tree | 4ae93fb32f267f7caa5ce55a6a52aac9f1f33bdd /tests/diagnostics | |
| parent | 1d8e93cd434f0c7acbb6db747b32c3a3720c5c2e (diff) | |
Allow default values for `extern` symbols. (#3632)
* Allow default values for `extern` symbols.
* Fix.
* Fix test.
Diffstat (limited to 'tests/diagnostics')
| -rw-r--r-- | tests/diagnostics/unresolved-symbol.slang | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/diagnostics/unresolved-symbol.slang b/tests/diagnostics/unresolved-symbol.slang new file mode 100644 index 000000000..d5c8444fc --- /dev/null +++ b/tests/diagnostics/unresolved-symbol.slang @@ -0,0 +1,18 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target hlsl -entry main -profile cs_6_0 +interface IFoo +{ + int doThing(); +} + +// CHECK: ([[#@LINE+1]]): error 45001: +extern struct Foo : IFoo; +// CHECK: ([[#@LINE+1]]): error 45001: +extern static const int c; + +RWStructuredBuffer<int> output; + +void main() +{ + Foo f; + output[0] = c + f.doThing(); +}
\ No newline at end of file |
