| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library conformance; |
| |
| union UnionWithBoundString { |
| 1: string:5 boundFiveStr; |
| }; |
| |
| struct UnionWithBoundStringStruct { |
| UnionWithBoundString v; |
| }; |
| |
| union SingleVariantUnion { |
| 1: uint32 x; |
| }; |
| |
| struct SingleVariantUnionStruct { |
| SingleVariantUnion u; |
| }; |
| |
| // Union tags follow the explicit ordinal order, not source order. |
| union ReverseOrdinalUnion { |
| 4: int64 x; // tag 2 |
| 3: reserved; |
| 2: bool y; // tag 1 |
| 1: uint32 z; // tag 0 |
| }; |
| |
| struct ReverseOrdinalUnionStruct { |
| ReverseOrdinalUnion u; |
| }; |