kantan-lang
kantan-lang copied to clipboard
Enum Fields are the same type as the enum
This allows weird behaviour like this:
type Enum enum {
First
}
type Test struct {
e: Enum
}
def main() {
let t: Test = undefined;
t.e.First; // this is currently valid
}
we can also crash the compiler by doing:
let t = Test;