butte
butte copied to clipboard
Union entries with associated types
The official docs has the following example under Unions:
table PointPosition { x:uint; y:uint; }
table MarkerPosition {}
union Position {
Start:MarkerPosition,
Point:PointPosition,
Finish:MarkerPosition
}
This is useful when having the same type for different actions. The workaround is to wrap MarketPosition in two tables Start and Finish.