mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
- Remove `[?]` syntax. - Change `int!` to `int?` syntax. - New `fault` declarations. - Enum associated values can reference the calling enum.
23 lines
256 B
Plaintext
23 lines
256 B
Plaintext
module test;
|
|
|
|
interface Abc : Def
|
|
{}
|
|
|
|
interface Def
|
|
{}
|
|
|
|
fn void? test()
|
|
{
|
|
any x;
|
|
Abc d = x; // #error: cannot implicitly be converted to 'Abc'
|
|
}
|
|
|
|
|
|
fn void? test2()
|
|
{
|
|
Abc x;
|
|
any d = x;
|
|
Def e = x;
|
|
x = e; // #error: is not a parent interface of 'Def'
|
|
}
|