| author | |
| committer | |
| log | 0eddee449d8a09a999b352d769b98379865e8dbc |
| tree | de6763742967dbe06124e89992f60c62b09b5a3f |
| parent | 67491a4222f2dacf047989329d4c16a5a2f163d5 |
| signature |
closes #27371 files changed, 7 insertions(+), 0 deletions(-)
test/stage1/behavior/enum.zig+7| ... | @@ -1007,3 +1007,10 @@ test "enum literal casting to error union with payload enum" { | ... | @@ -1007,3 +1007,10 @@ test "enum literal casting to error union with payload enum" { |
| 1007 | 1007 | ||
| 1008 | expect((try bar) == Bar.B); | 1008 | expect((try bar) == Bar.B); |
| 1009 | } | 1009 | } |
| 1010 | |||
| 1011 | test "enum with one member and u1 tag type @enumToInt" { | ||
| 1012 | const Enum = enum(u1) { | ||
| 1013 | Test, | ||
| 1014 | }; | ||
| 1015 | expect(@enumToInt(Enum.Test) == 0); | ||
| 1016 | } |