| ... | @@ -648,7 +648,7 @@ const TagPayloadType = TagPayload; | ... | @@ -648,7 +648,7 @@ const TagPayloadType = TagPayload; |
| 648 | ///Given a tagged union type, and an enum, return the type of the union | 648 | ///Given a tagged union type, and an enum, return the type of the union |
| 649 | /// field corresponding to the enum tag. | 649 | /// field corresponding to the enum tag. |
| 650 | pub fn TagPayload(comptime U: type, tag: Tag(U)) type { | 650 | pub fn TagPayload(comptime U: type, tag: Tag(U)) type { |
| 651 | try testing.expect(trait.is(.Union)(U)); | 651 | comptime debug.assert(trait.is(.Union)(U)); |
| 652 | | 652 | |
| 653 | const info = @typeInfo(U).Union; | 653 | const info = @typeInfo(U).Union; |
| 654 | | 654 | |