diff options
| author | Yong He <yonghe@outlook.com> | 2024-09-04 13:25:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-04 13:25:37 -0700 |
| commit | ddd29057e48a5b309726750e3daf78bfd073038e (patch) | |
| tree | a054b99acb87d61ef4818dce5fa837ccfd050288 /tests/diagnostics/interfaces | |
| parent | 56a3c028a6725e13a2ae3a724eaee05ad9f4802a (diff) | |
Fix extension override behavior, and disallow extension on interface types. (#4977)
* Add a test to ensure extension does not override existing conformance.
* Fix doc.
* Update documentation.
* Fix doc.
* Add diagnostic test.
Diffstat (limited to 'tests/diagnostics/interfaces')
| -rw-r--r-- | tests/diagnostics/interfaces/interface-extension.slang | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/diagnostics/interfaces/interface-extension.slang b/tests/diagnostics/interfaces/interface-extension.slang new file mode 100644 index 000000000..b63b454ab --- /dev/null +++ b/tests/diagnostics/interfaces/interface-extension.slang @@ -0,0 +1,10 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):-target cpp -stage compute -entry main -disable-specialization + +interface IFoo{} + + +// CHECK: ([[# @LINE+1]]): error 30852 +extension IFoo +{ + int f() { return 0; } +}
\ No newline at end of file |
