zig/test/cases/bugs/1111.zig
Jimmi Holst Christensen 378d3e4403
Solve the return type ambiguity (#1628)
Changed container and initializer syntax
* <container> { ... } -> <container> . { ... }
* <exrp> { ... } -> <expr> . { ...}
2018-10-15 09:51:15 -04:00

13 lines
170 B
Zig

const Foo = extern enum.{
Bar = -1,
};
test "issue 1111 fixed" {
const v = Foo.Bar;
switch (v) {
Foo.Bar => return,
else => return,
}
}