Files
c3c/test/test_suite/enumerations/enum_const_inline_interface.c3
Christoffer Lerno acc4a900f5 - New const enum declaration syntax.
- New enum associated value syntax.
2026-02-12 14:43:56 +01:00

26 lines
294 B
Plaintext

module foo;
import std;
interface Test
{
fn void x();
}
typedef Foo (Test) = int;
fn void Foo.x(&self) @dynamic
{
io::printn("Foo!");
}
const enum Tester : inline Foo
{
ABC = 1
}
fn int main()
{
Tester x;
Test t = &x; // #error: but you can use an explicit cast to
t.x();
return 0;
}