Squashed 'third_party/flatbuffers/' changes from bc44fad35..8aa8b9139

8aa8b9139 Fix handling of +/-inf defaults in TS/rust/go/dart codegen (#7588)
001adf782 Add support for parsing proto map fields (#7613)
dbc58ab77 Fix help output for --gen-includes (#7611)
2facfeec7 Fix missing spaces in flatc help text (#7612)
4de2814c7 Fix: arduino platform build (#7625)
37b1acdaf Fix current official name of macOS (#7627)
a22434e2a Add missing #include <algorithm> for std::min/std::max uses, and #include <limits> for std::numeric_limits<> (#7624)
214cc9468 Bump Rust version to 22.10.26 before publication (#7622)
a4ff275d9 Added option to not requires an EoF token when parsing JSON (#7620)
15f32c690 python: object generation prefix and suffix (#7565)
051afd882 Add CreateSharedString to python builder (#7608)
728c033ad Add check for presence of realpath to CMakeLists.txt to support more platforms (#7603)
4c514483d Update DartTest.sh golden files (#7606)
c2d9c2080 [TS] Add support for fixed length arrays on Typescript (#5864) (#7021) (#7581)
e34ae4c6b `build.yml`: Fix missing 'v' in version
e54536127 `build.yml` Update to Kotlin Wrapper 1.0.5
49d9f941c `release.yml` Use env var for passphrase
cefc21c1f `release.yml` Add GPG key for Maven
3e64fa724 `release.yml`: Add Maven Steps
b15f3c57e `release_yml` Use new dotnet version
ff802c680 `release.yml` Use NuGet Key directly
b401957d5 `release.yml` Changed Push to follow examples
8c8151f8f `release.yml` Fix nuget push command
ebb7c203d `release.yml` Add Nuget support
203241ed3 FlatBuffers Version 22.10.26 (#7607)
ac485609c `setup.py`: Define version directly
de5b85aa6 `release.yml`: Switch to `python` directory
de3df2d88 `release.yml`: Add publishing to PyPi
043a24f2e [Python] Fixed the issue with nested unions relying on InitFromBuf. (#7576)
5a48b0d7d release.yml: Typo
ce307556f release.yml: Remove `npm ci`
cb616e27c Create release.yml (#7605)
a54ca1e75 FlatBuffers Version 22.10.25 (#7604)
5b3fadcc1 [vector] Allow to iterate with mutables (#7586)
872a49746 [Nim] Bfbs Nim Generator (#7534)
e30170296 Make type conversions explicit. (#7595)
f7b734438 Fix LongEnum definitions (#7596)
5792623df Rust fix compilation for no_std targets #2 (#7553)
0edb27528 Update Rust version (#7574)
acc6a20d3 tests/test.cpp contains a couple of tests that are only executed (#7571)
04cd037ba Fix #7580 by documenting union schema evolution rules (#7585)
e1c5db988 Turn on clippy for Rust and fix lints for non-generated code (#7575)
b80142b90 Update documentation to mention enum value attributes (#7570)
54418f371 Add support for metadata attributes for enum values (#7567) (#7568)
c92e78a9f FlatBuffers Version 22.9.29 (#7557)
d243b904c [TS] Make strict compliant and improve typings (#7549)
374f8fb5f Rust soundness fixes (#7518)
dadbff571 Moves swift package to root of repository so it can be used directly … (#7548)
76ddae006 FlatBuffers Version 22.9.24 (#7547)
cfe157ec5 Emit internal enums when swift_implementation_only (#7545)
413115858 [Python] Python fixed size array (#7529)
88046190e Upgrade grpc to 1.49.0 and make sure it builds (#7538)
72aa85a75 [C++] Rare bad buffer content alignment if sizeof(T) != alignof(T) (#7520)
bfceebb7f Fix conform (#7532)

git-subtree-dir: third_party/flatbuffers
git-subtree-split: 8aa8b9139eb330f27816a5b8b5bbef402fbe3632
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
Change-Id: I943faba499baf58e9f561b1e4734922188ba8626
diff --git a/tests/ts/my-game/example/monster.js b/tests/ts/my-game/example/monster.js
index e4ef970..97c9399 100644
--- a/tests/ts/my-game/example/monster.js
+++ b/tests/ts/my-game/example/monster.js
@@ -526,11 +526,95 @@
         this.bb.writeUint64(this.bb_pos + offset, value);
         return true;
     }
+    nanDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 112);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : NaN;
+    }
+    mutate_nan_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 112);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    infDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 114);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity;
+    }
+    mutate_inf_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 114);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    positiveInfDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 116);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity;
+    }
+    mutate_positive_inf_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 116);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    infinityDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 118);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity;
+    }
+    mutate_infinity_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 118);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    positiveInfinityDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 120);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : Infinity;
+    }
+    mutate_positive_infinity_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 120);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    negativeInfDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 122);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : -Infinity;
+    }
+    mutate_negative_inf_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 122);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
+    negativeInfinityDefault() {
+        const offset = this.bb.__offset(this.bb_pos, 124);
+        return offset ? this.bb.readFloat32(this.bb_pos + offset) : -Infinity;
+    }
+    mutate_negative_infinity_default(value) {
+        const offset = this.bb.__offset(this.bb_pos, 124);
+        if (offset === 0) {
+            return false;
+        }
+        this.bb.writeFloat32(this.bb_pos + offset, value);
+        return true;
+    }
     static getFullyQualifiedName() {
         return 'MyGame_Example_Monster';
     }
     static startMonster(builder) {
-        builder.startObject(54);
+        builder.startObject(61);
     }
     static addPos(builder, posOffset) {
         builder.addFieldStruct(0, posOffset, 0);
@@ -870,6 +954,27 @@
     static addLongEnumNormalDefault(builder, longEnumNormalDefault) {
         builder.addFieldInt64(53, longEnumNormalDefault, BigInt('2'));
     }
+    static addNanDefault(builder, nanDefault) {
+        builder.addFieldFloat32(54, nanDefault, NaN);
+    }
+    static addInfDefault(builder, infDefault) {
+        builder.addFieldFloat32(55, infDefault, Infinity);
+    }
+    static addPositiveInfDefault(builder, positiveInfDefault) {
+        builder.addFieldFloat32(56, positiveInfDefault, Infinity);
+    }
+    static addInfinityDefault(builder, infinityDefault) {
+        builder.addFieldFloat32(57, infinityDefault, Infinity);
+    }
+    static addPositiveInfinityDefault(builder, positiveInfinityDefault) {
+        builder.addFieldFloat32(58, positiveInfinityDefault, Infinity);
+    }
+    static addNegativeInfDefault(builder, negativeInfDefault) {
+        builder.addFieldFloat32(59, negativeInfDefault, -Infinity);
+    }
+    static addNegativeInfinityDefault(builder, negativeInfinityDefault) {
+        builder.addFieldFloat32(60, negativeInfinityDefault, -Infinity);
+    }
     static endMonster(builder) {
         const offset = builder.endObject();
         builder.requiredField(offset, 10); // name
@@ -889,24 +994,24 @@
     }
     unpack() {
         return new MonsterT((this.pos() !== null ? this.pos().unpack() : null), this.mana(), this.hp(), this.name(), this.bb.createScalarList(this.inventory.bind(this), this.inventoryLength()), this.color(), this.testType(), (() => {
-            let temp = unionToAny(this.testType(), this.test.bind(this));
+            const temp = unionToAny(this.testType(), this.test.bind(this));
             if (temp === null) {
                 return null;
             }
             return temp.unpack();
         })(), this.bb.createObjList(this.test4.bind(this), this.test4Length()), this.bb.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength()), this.bb.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength()), (this.enemy() !== null ? this.enemy().unpack() : null), this.bb.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()), (this.testempty() !== null ? this.testempty().unpack() : null), this.testbool(), this.testhashs32Fnv1(), this.testhashu32Fnv1(), this.testhashs64Fnv1(), this.testhashu64Fnv1(), this.testhashs32Fnv1a(), this.testhashu32Fnv1a(), this.testhashs64Fnv1a(), this.testhashu64Fnv1a(), this.bb.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength()), this.testf(), this.testf2(), this.testf3(), this.bb.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()), this.bb.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()), this.bb.createScalarList(this.flex.bind(this), this.flexLength()), this.bb.createObjList(this.test5.bind(this), this.test5Length()), this.bb.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()), this.bb.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()), (this.parentNamespaceTest() !== null ? this.parentNamespaceTest().unpack() : null), this.bb.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()), this.singleWeakReference(), this.bb.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()), this.bb.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()), this.coOwningReference(), this.bb.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()), this.nonOwningReference(), this.bb.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()), this.anyUniqueType(), (() => {
-            let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
+            const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
             if (temp === null) {
                 return null;
             }
             return temp.unpack();
         })(), this.anyAmbiguousType(), (() => {
-            let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
+            const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
             if (temp === null) {
                 return null;
             }
             return temp.unpack();
-        })(), this.bb.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()), this.signedEnum(), this.bb.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()), this.bb.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()), (this.nativeInline() !== null ? this.nativeInline().unpack() : null), this.longEnumNonEnumDefault(), this.longEnumNormalDefault());
+        })(), this.bb.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()), this.signedEnum(), this.bb.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()), this.bb.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()), (this.nativeInline() !== null ? this.nativeInline().unpack() : null), this.longEnumNonEnumDefault(), this.longEnumNormalDefault(), this.nanDefault(), this.infDefault(), this.positiveInfDefault(), this.infinityDefault(), this.positiveInfinityDefault(), this.negativeInfDefault(), this.negativeInfinityDefault());
     }
     unpackTo(_o) {
         _o.pos = (this.pos() !== null ? this.pos().unpack() : null);
@@ -917,7 +1022,7 @@
         _o.color = this.color();
         _o.testType = this.testType();
         _o.test = (() => {
-            let temp = unionToAny(this.testType(), this.test.bind(this));
+            const temp = unionToAny(this.testType(), this.test.bind(this));
             if (temp === null) {
                 return null;
             }
@@ -959,7 +1064,7 @@
         _o.vectorOfNonOwningReferences = this.bb.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength());
         _o.anyUniqueType = this.anyUniqueType();
         _o.anyUnique = (() => {
-            let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
+            const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
             if (temp === null) {
                 return null;
             }
@@ -967,7 +1072,7 @@
         })();
         _o.anyAmbiguousType = this.anyAmbiguousType();
         _o.anyAmbiguous = (() => {
-            let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
+            const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
             if (temp === null) {
                 return null;
             }
@@ -980,10 +1085,17 @@
         _o.nativeInline = (this.nativeInline() !== null ? this.nativeInline().unpack() : null);
         _o.longEnumNonEnumDefault = this.longEnumNonEnumDefault();
         _o.longEnumNormalDefault = this.longEnumNormalDefault();
+        _o.nanDefault = this.nanDefault();
+        _o.infDefault = this.infDefault();
+        _o.positiveInfDefault = this.positiveInfDefault();
+        _o.infinityDefault = this.infinityDefault();
+        _o.positiveInfinityDefault = this.positiveInfinityDefault();
+        _o.negativeInfDefault = this.negativeInfDefault();
+        _o.negativeInfinityDefault = this.negativeInfinityDefault();
     }
 }
 export class MonsterT {
-    constructor(pos = null, mana = 150, hp = 100, name = null, inventory = [], color = Color.Blue, testType = Any.NONE, test = null, test4 = [], testarrayofstring = [], testarrayoftables = [], enemy = null, testnestedflatbuffer = [], testempty = null, testbool = false, testhashs32Fnv1 = 0, testhashu32Fnv1 = 0, testhashs64Fnv1 = BigInt('0'), testhashu64Fnv1 = BigInt('0'), testhashs32Fnv1a = 0, testhashu32Fnv1a = 0, testhashs64Fnv1a = BigInt('0'), testhashu64Fnv1a = BigInt('0'), testarrayofbools = [], testf = 3.14159, testf2 = 3.0, testf3 = 0.0, testarrayofstring2 = [], testarrayofsortedstruct = [], flex = [], test5 = [], vectorOfLongs = [], vectorOfDoubles = [], parentNamespaceTest = null, vectorOfReferrables = [], singleWeakReference = BigInt('0'), vectorOfWeakReferences = [], vectorOfStrongReferrables = [], coOwningReference = BigInt('0'), vectorOfCoOwningReferences = [], nonOwningReference = BigInt('0'), vectorOfNonOwningReferences = [], anyUniqueType = AnyUniqueAliases.NONE, anyUnique = null, anyAmbiguousType = AnyAmbiguousAliases.NONE, anyAmbiguous = null, vectorOfEnums = [], signedEnum = Race.None, testrequirednestedflatbuffer = [], scalarKeySortedTables = [], nativeInline = null, longEnumNonEnumDefault = BigInt('0'), longEnumNormalDefault = BigInt('2')) {
+    constructor(pos = null, mana = 150, hp = 100, name = null, inventory = [], color = Color.Blue, testType = Any.NONE, test = null, test4 = [], testarrayofstring = [], testarrayoftables = [], enemy = null, testnestedflatbuffer = [], testempty = null, testbool = false, testhashs32Fnv1 = 0, testhashu32Fnv1 = 0, testhashs64Fnv1 = BigInt('0'), testhashu64Fnv1 = BigInt('0'), testhashs32Fnv1a = 0, testhashu32Fnv1a = 0, testhashs64Fnv1a = BigInt('0'), testhashu64Fnv1a = BigInt('0'), testarrayofbools = [], testf = 3.14159, testf2 = 3.0, testf3 = 0.0, testarrayofstring2 = [], testarrayofsortedstruct = [], flex = [], test5 = [], vectorOfLongs = [], vectorOfDoubles = [], parentNamespaceTest = null, vectorOfReferrables = [], singleWeakReference = BigInt('0'), vectorOfWeakReferences = [], vectorOfStrongReferrables = [], coOwningReference = BigInt('0'), vectorOfCoOwningReferences = [], nonOwningReference = BigInt('0'), vectorOfNonOwningReferences = [], anyUniqueType = AnyUniqueAliases.NONE, anyUnique = null, anyAmbiguousType = AnyAmbiguousAliases.NONE, anyAmbiguous = null, vectorOfEnums = [], signedEnum = Race.None, testrequirednestedflatbuffer = [], scalarKeySortedTables = [], nativeInline = null, longEnumNonEnumDefault = BigInt('0'), longEnumNormalDefault = BigInt('2'), nanDefault = NaN, infDefault = Infinity, positiveInfDefault = Infinity, infinityDefault = Infinity, positiveInfinityDefault = Infinity, negativeInfDefault = -Infinity, negativeInfinityDefault = -Infinity) {
         this.pos = pos;
         this.mana = mana;
         this.hp = hp;
@@ -1037,6 +1149,13 @@
         this.nativeInline = nativeInline;
         this.longEnumNonEnumDefault = longEnumNonEnumDefault;
         this.longEnumNormalDefault = longEnumNormalDefault;
+        this.nanDefault = nanDefault;
+        this.infDefault = infDefault;
+        this.positiveInfDefault = positiveInfDefault;
+        this.infinityDefault = infinityDefault;
+        this.positiveInfinityDefault = positiveInfinityDefault;
+        this.negativeInfDefault = negativeInfDefault;
+        this.negativeInfinityDefault = negativeInfinityDefault;
     }
     pack(builder) {
         const name = (this.name !== null ? builder.createString(this.name) : 0);
@@ -1120,6 +1239,13 @@
         Monster.addNativeInline(builder, (this.nativeInline !== null ? this.nativeInline.pack(builder) : 0));
         Monster.addLongEnumNonEnumDefault(builder, this.longEnumNonEnumDefault);
         Monster.addLongEnumNormalDefault(builder, this.longEnumNormalDefault);
+        Monster.addNanDefault(builder, this.nanDefault);
+        Monster.addInfDefault(builder, this.infDefault);
+        Monster.addPositiveInfDefault(builder, this.positiveInfDefault);
+        Monster.addInfinityDefault(builder, this.infinityDefault);
+        Monster.addPositiveInfinityDefault(builder, this.positiveInfinityDefault);
+        Monster.addNegativeInfDefault(builder, this.negativeInfDefault);
+        Monster.addNegativeInfinityDefault(builder, this.negativeInfinityDefault);
         return Monster.endMonster(builder);
     }
 }