Checking for clashes between field names and generated field names.

This happens when the schema is parsed, to avoid compile time errors
later, which would be harder to understand.

Bug: 16325216
Change-Id: I24cabf1adaf1700796b91e3a9641bca43a68bfbd
Tested: on OS X.
This commit is contained in:
Wouter van Oortmerssen
2014-08-21 15:02:15 -07:00
parent 30af866e5a
commit 541b06759f
2 changed files with 26 additions and 0 deletions

View File

@@ -488,6 +488,7 @@ void ErrorTest() {
TestError("struct X { Y:int; } root_type X;", "a table");
TestError("union X { Y }", "referenced");
TestError("union Z { X } struct X { Y:int; }", "only tables");
TestError("table X { Y:[int]; YLength:int; }", "clash");
}
// Additional parser testing not covered elsewhere.