fix check for Enum defaults (#5292)

fixes #5288
This commit is contained in:
Nils Berg
2019-04-15 20:38:44 +02:00
committed by Wouter van Oortmerssen
parent cef8f928bb
commit 90441c2078
2 changed files with 2 additions and 1 deletions

View File

@@ -1275,6 +1275,7 @@ void ErrorTest() {
TestError("table Y {} table X { Y:int; }", "same as table");
TestError("struct X { Y:string; }", "only scalar");
TestError("table X { Y:string = \"\"; }", "default values");
TestError("struct X { a:uint = 42; }", "default values");
TestError("enum Y:byte { Z = 1 } table X { y:Y; }", "not part of enum");
TestError("struct X { Y:int (deprecated); }", "deprecate");
TestError("union Z { X } table X { Y:Z; } root_type X; { Y: {}, A:1 }",