| ... | @@ -719,7 +719,7 @@ pub fn TagPayloadByName(comptime U: type, comptime tag_name: []const u8) type { | ... | @@ -719,7 +719,7 @@ pub fn TagPayloadByName(comptime U: type, comptime tag_name: []const u8) type { |
| 719 | return field_info.type; | 719 | return field_info.type; |
| 720 | } | 720 | } |
| 721 | | 721 | |
| 722 | unreachable; | 722 | @compileError("no field '" ++ tag_name ++ "' in union '" ++ @typeName(U) ++ "'"); |
| 723 | } | 723 | } |
| 724 | | 724 | |
| 725 | /// Given a tagged union type, and an enum, return the type of the union field | 725 | /// Given a tagged union type, and an enum, return the type of the union field |