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/language-feature | |
| 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/language-feature')
3 files changed, 13 insertions, 13 deletions
diff --git a/tests/language-feature/extensions/extension-import-helper.slang b/tests/language-feature/extensions/extension-import-helper.slang index c1a652645..11265762a 100644 --- a/tests/language-feature/extensions/extension-import-helper.slang +++ b/tests/language-feature/extensions/extension-import-helper.slang @@ -2,12 +2,12 @@ //TEST_IGNORE_FILE: -interface IThing +public interface IThing { - float getValue(); + public float getValue(); } -extension float : IThing +public extension float : IThing { - float getValue() { return this; } -}
\ No newline at end of file + public float getValue() { return this; } +} diff --git a/tests/language-feature/generics/struct-generic-value-param-import.slang b/tests/language-feature/generics/struct-generic-value-param-import.slang index edc1b0c39..785b8146f 100644 --- a/tests/language-feature/generics/struct-generic-value-param-import.slang +++ b/tests/language-feature/generics/struct-generic-value-param-import.slang @@ -6,13 +6,13 @@ // for `struct` decalrations in Slang files, including // any `import`ed code. -interface IData {} +public interface IData {} -struct Data<let kCount : int> : IData +public struct Data<let kCount : int> : IData { - int state; + public int state; - [mutating] void doStuff() + [mutating] public void doStuff() { state++; } diff --git a/tests/language-feature/inheritance/struct-inheritance-imported.slang b/tests/language-feature/inheritance/struct-inheritance-imported.slang index 8786b851c..16816ec97 100644 --- a/tests/language-feature/inheritance/struct-inheritance-imported.slang +++ b/tests/language-feature/inheritance/struct-inheritance-imported.slang @@ -1,12 +1,12 @@ //TEST_IGNORE_FILE: // struct-inheritance-imported.slang -struct Base +public struct Base { - int a; + public int a; } -struct Derived : Base +public struct Derived : Base {} -int getA(Derived d) { return d.a; } +public int getA(Derived d) { return d.a; } |
