diff options
| author | Yong He <yonghe@outlook.com> | 2023-12-06 15:52:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-06 15:52:02 -0800 |
| commit | 8102e5ee81db177372bb90188c65d003a4907aa4 (patch) | |
| tree | 2ea145d7a58abe395e1765009bc943d97933104b /tests | |
| parent | 11111e5733b189127dc2c4934d67693b9bc6e764 (diff) | |
Change default visibility of interface members and update docs. (#3381)
* Update behavior around interfaces and docs.
* Update toc
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/diagnostics/internal-visibility/interface-default-visibility.slang | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/diagnostics/internal-visibility/interface-default-visibility.slang b/tests/diagnostics/internal-visibility/interface-default-visibility.slang new file mode 100644 index 000000000..79df14143 --- /dev/null +++ b/tests/diagnostics/internal-visibility/interface-default-visibility.slang @@ -0,0 +1,14 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): + +module m; + +public interface IFoo +{ + void foo(); // Should have public visibility by default. +} + +public struct F : IFoo +{ + // CHECK:{{.*}}(13): error 30602: + void foo() {}; +} |
