| 1 | const std = @import( |
| 2 | "std", |
| 3 | ); |
| 4 | const Allocator = std.mem.Allocator; |
| 5 | const ArrayList = std.ArrayList; |
| 6 | |
| 7 | const HeaderWeight = enum { H1, H2, H3, H4, H5, H6 }; |
| 8 | |
| 9 | const MdText = ArrayList(u8); |
| 10 | |
| 11 | const MdNode = union(enum) { |
| 12 | Header: struct { |
| 13 | text: MdText, |
| 14 | weight: HeaderValue, |
| 15 | }, |
| 16 | }; |
| 17 | |
| 18 | export fn entry() void { |
| 19 | const a = MdNode.Header{ |
| 20 | .text = MdText.init(std.testing.allocator), |
| 21 | .weight = HeaderWeight.H1, |
| 22 | }; |
| 23 | _ = a; |
| 24 | } |
| 25 | |
| 26 | // error |
| 27 | // |
| 28 | // :14:17: error: use of undeclared identifier 'HeaderValue' |