Bug:
17304016
Change-Id: I4873f8ef32fbb2657f15fc53a2c8f767e10f2d96
Tested: on Linux
if (token_ == '=') {
Next();
+ if (!IsScalar(type.base_type))
+ Error("default values currently only supported for scalars");
ParseSingleValue(field.value);
}
TestError("union X { Y }", "referenced");
TestError("union Z { X } struct X { Y:int; }", "only tables");
TestError("table X { Y:[int]; YLength:int; }", "clash");
+ TestError("table X { Y:string = 1; }", "scalar");
}
// Additional parser testing not covered elsewhere.