mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-04 20:48:59 +00:00
make unions with type aliases more usable (#5019)
Some generic C++ and Rust code is not generated when unions use type aliases because of potential ambiguity. Actually check for this ambiguity and only disable offending code only if it is found.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
4c3b6c247d
commit
91fe9ba93f
18
tests/MyGame/Example/AnyAmbiguousAliases.java
Normal file
18
tests/MyGame/Example/AnyAmbiguousAliases.java
Normal file
@@ -0,0 +1,18 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package MyGame.Example;
|
||||
|
||||
|
||||
@javax.annotation.Generated(value="flatc")
|
||||
public final class AnyAmbiguousAliases {
|
||||
private AnyAmbiguousAliases() { }
|
||||
public static final byte NONE = 0;
|
||||
public static final byte M1 = 1;
|
||||
public static final byte M2 = 2;
|
||||
public static final byte M3 = 3;
|
||||
|
||||
public static final String[] names = { "NONE", "M1", "M2", "M3", };
|
||||
|
||||
public static String name(int e) { return names[e]; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user