felixangell / kpd

an old compiler for Krug written in D - a prototype version
MIT License
44 stars 1 forks source link

check for symbol conflicts in tagged unions #50

Closed felixangell closed 6 years ago

felixangell commented 6 years ago

The following compiles with no errors:

type Foo enum {
    Label,
    Tagged { x s32, y s32 },
    Tagged { x s32, y s32 },
    Tagged { x s32, y s32 },
    Tagged { x s32, y s32 },
    Anonymous (s32, s32),
    Anonymous (s32, s32),
    Anonymous (s32, s32),
    Anonymous (s32, s32),
    Anonymous (s32, s32),
    Foo,
    Bar,
    Baz,
};