make switch expressions allow enum literal types

See #683
This commit is contained in:
Andrew Kelley
2019-03-24 01:15:21 -04:00
parent a736dfe6a1
commit aff7b38838
2 changed files with 9 additions and 8 deletions

View File

@@ -203,7 +203,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
\\const InvalidToken = struct {};
\\const ExpectedVarDeclOrFn = struct {};
,
"tmp.zig:4:9: error: not an enum type",
"tmp.zig:4:9: error: expected type '@TagType(Error)', found 'type'",
);
cases.addTest(