| ... | @@ -94,6 +94,9 @@ pub fn format( | ... | @@ -94,6 +94,9 @@ pub fn format( |
| 94 | args: var, | 94 | args: var, |
| 95 | ) Errors!void { | 95 | ) Errors!void { |
| 96 | const ArgSetType = @IntType(false, 32); | 96 | const ArgSetType = @IntType(false, 32); |
| | 97 | if (@typeInfo(@TypeOf(args)) != .Struct) { |
| | 98 | @compileError("Expected tuple or struct argument, found " ++ @typeName(@TypeOf(args))); |
| | 99 | } |
| 97 | if (args.len > ArgSetType.bit_count) { | 100 | if (args.len > ArgSetType.bit_count) { |
| 98 | @compileError("32 arguments max are supported per format call"); | 101 | @compileError("32 arguments max are supported per format call"); |
| 99 | } | 102 | } |