diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-12-05 21:33:24 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-12-05 21:33:24 -0500 |
| commit | c49ee9f632dd5ee7f341e9093234f39c19a32115 (patch) | |
| tree | 4ea672c35b3a6fd9dcb34df401b5d002ada560cf /test | |
| parent | 2715f6fdb8bca1c88c58dac047889711359e193b (diff) | |
| download | zig-c49ee9f632dd5ee7f341e9093234f39c19a32115.tar.gz zig-c49ee9f632dd5ee7f341e9093234f39c19a32115.zip | |
allow union and its tag type to peer resolve to the tag type
Diffstat (limited to 'test')
| -rw-r--r-- | test/cases/union.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/cases/union.zig b/test/cases/union.zig index 5657767dce..7c1c04c711 100644 --- a/test/cases/union.zig +++ b/test/cases/union.zig @@ -200,6 +200,7 @@ const Value2 = union(Letter2) { A: i32, B, C, }; test "implicit cast union to its tag type" { var x: Value2 = Letter2.B; + assert(x == Letter2.B); giveMeLetterB(x); } fn giveMeLetterB(x: Letter2) { |
