diff options
| author | Yong He <yonghe@outlook.com> | 2023-12-06 12:05:07 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-06 12:05:07 -0800 |
| commit | 11111e5733b189127dc2c4934d67693b9bc6e764 (patch) | |
| tree | 0ba84df3e856eb104abec2ecac47242bc70a7b7d /tests/diagnostics/visibility.slang | |
| parent | fa6d8717d02912697c09f2d7de802723ac6d6e47 (diff) | |
Support visibility control and default to `internal`. (#3380)
* Support visibility control and default to `internal`.
* Fix wip.
* Fixes.
* Fix.
* Fix test.
* Add legacy language detection and compatibility for existing code.
* Add doc.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/diagnostics/visibility.slang')
| -rw-r--r-- | tests/diagnostics/visibility.slang | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/diagnostics/visibility.slang b/tests/diagnostics/visibility.slang new file mode 100644 index 000000000..724ec30e7 --- /dev/null +++ b/tests/diagnostics/visibility.slang @@ -0,0 +1,23 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): + +// CHECK-DAG:{{.*}}(4): error 30603 +private struct MyStruct +{} + +struct IS +{ + // CHECK-DAG:{{.*}}(10): error 30601 + public void fp(); +} + +// CHECK-DAG:{{.*}}(14): error 30604 +public IS f() {} + +public struct PS +{ + // CHECK-DAG:{{.*}}(19): error 30604 + public IS ii; + + // CHECK-DAG:{{.*}}(22): error 30604 + public property IS ii2 { get { return {}; } }; +} |
