forked from BigfootDev/flatbuffers
Simplify templates
This commit is contained in:
@@ -24,12 +24,12 @@ table Matrix (native_type:"Native::Matrix") {
|
||||
// field via `native_type_template_arg` instead of needing one flatbuffers
|
||||
// struct declaration per specialization (compare to Vector3D/Vector3DAlt
|
||||
// above).
|
||||
struct Tagged (native_type_template: "Native::Tagged<{{T}}>") {
|
||||
struct Tagged (native_type_template: "Native::Tagged") {
|
||||
value:int32;
|
||||
}
|
||||
|
||||
// A native type template that takes more than one argument.
|
||||
struct Pair (native_type_template: "Native::Pair<{{T0}}, {{T1}}>") {
|
||||
struct Pair (native_type_template: "Native::Pair") {
|
||||
value:int32;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,14 +106,6 @@ void ErrorTest() {
|
||||
"struct-typed fields");
|
||||
TestError(
|
||||
"struct X (native_type_template: \"Foo\") { Y:int; } "
|
||||
"table T { y:X (native_type_template_arg:\"int\"); }",
|
||||
"does not reference");
|
||||
TestError(
|
||||
"struct X (native_type_template: \"Foo<{{T0}}, {{T1}}>\") { Y:int; } "
|
||||
"table T { y:X (native_type_template_arg:\"int\"); }",
|
||||
"beyond the");
|
||||
TestError(
|
||||
"struct X (native_type_template: \"Foo<{{T}}>\") { Y:int; } "
|
||||
"table T { y:X (native_type_template_arg:\"\"); }",
|
||||
"empty template argument");
|
||||
TestError("{}", "no root");
|
||||
|
||||
Reference in New Issue
Block a user