mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-18 17:28:56 +00:00
fix union type names (#5902)
* fix union type names * fix up generation and test * format * update codegen
This commit is contained in:
@@ -18,9 +18,9 @@ pushd "$(dirname $0)" >/dev/null
|
||||
|
||||
command -v pub >/dev/null 2>&1 || { echo >&2 "Dart tests require `pub` but it's not installed. Aborting."; exit 1; }
|
||||
command -v dart >/dev/null 2>&1 || { echo >&2 "Dart tests require dart to be in path but it's not installed. Aborting."; exit 1; }
|
||||
# output required files to the dart folder so that pub will be able to
|
||||
# output required files to the dart folder so that pub will be able to
|
||||
# distribute them and more people can more easily run the dart tests
|
||||
../flatc --dart -I include_test -o ../dart/test monster_test.fbs
|
||||
../flatc --dart --no-includes -I include_test -o ../dart/test monster_test.fbs
|
||||
cp monsterdata_test.mon ../dart/test
|
||||
|
||||
cd ../dart
|
||||
|
||||
@@ -784,18 +784,18 @@ class Monster {
|
||||
AnyUniqueAliasesTypeId get anyUniqueType => new AnyUniqueAliasesTypeId.fromValue(const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 90, 0));
|
||||
dynamic get anyUnique {
|
||||
switch (anyUniqueType?.value) {
|
||||
case 1: return M.reader.vTableGet(_bc, _bcOffset, 92, null);
|
||||
case 2: return TS.reader.vTableGet(_bc, _bcOffset, 92, null);
|
||||
case 3: return M2.reader.vTableGet(_bc, _bcOffset, 92, null);
|
||||
case 1: return Monster.reader.vTableGet(_bc, _bcOffset, 92, null);
|
||||
case 2: return TestSimpleTableWithEnum.reader.vTableGet(_bc, _bcOffset, 92, null);
|
||||
case 3: return my_game_example2.Monster.reader.vTableGet(_bc, _bcOffset, 92, null);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
AnyAmbiguousAliasesTypeId get anyAmbiguousType => new AnyAmbiguousAliasesTypeId.fromValue(const fb.Uint8Reader().vTableGet(_bc, _bcOffset, 94, 0));
|
||||
dynamic get anyAmbiguous {
|
||||
switch (anyAmbiguousType?.value) {
|
||||
case 1: return M1.reader.vTableGet(_bc, _bcOffset, 96, null);
|
||||
case 2: return M2.reader.vTableGet(_bc, _bcOffset, 96, null);
|
||||
case 3: return M3.reader.vTableGet(_bc, _bcOffset, 96, null);
|
||||
case 1: return Monster.reader.vTableGet(_bc, _bcOffset, 96, null);
|
||||
case 2: return Monster.reader.vTableGet(_bc, _bcOffset, 96, null);
|
||||
case 3: return Monster.reader.vTableGet(_bc, _bcOffset, 96, null);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user