| author | |
| committer | |
| log | 69a3c4e279238874cc74cf6acd5eb0426d5b65ee |
| tree | edd74a424809552005ec6a3ef7a210aa8892eb1a |
| parent | f49dff64c64baf8be48cc987b4ed61712afabc3d |
Closes #126222 files changed, 15 insertions(+), 2 deletions(-)
src/Sema.zig+1-2| ... | @@ -5941,10 +5941,9 @@ fn analyzeCall( | ... | @@ -5941,10 +5941,9 @@ fn analyzeCall( |
| 5941 | undefined, | 5941 | undefined, |
| 5942 | ) catch |err| switch (err) { | 5942 | ) catch |err| switch (err) { |
| 5943 | error.NeededSourceLocation => { | 5943 | error.NeededSourceLocation => { |
| 5944 | sema.inst_map.clearRetainingCapacity(); | 5944 | _ = sema.inst_map.remove(inst); |
| 5945 | const decl = sema.mod.declPtr(block.src_decl); | 5945 | const decl = sema.mod.declPtr(block.src_decl); |
| 5946 | child_block.src_decl = block.src_decl; | 5946 | child_block.src_decl = block.src_decl; |
| 5947 | arg_i = 0; | ||
| 5948 | try sema.analyzeInlineCallArg( | 5947 | try sema.analyzeInlineCallArg( |
| 5949 | block, | 5948 | block, |
| 5950 | &child_block, | 5949 | &child_block, |
test/cases/compile_errors/error_in_typeof_param.zig created+14| ... | @@ -0,0 +1,14 @@ | ||
| 1 | fn getSize() usize { | ||
| 2 | return 2; | ||
| 3 | } | ||
| 4 | pub fn expectEqual(expected: anytype, _: @TypeOf(expected)) !void {} | ||
| 5 | pub export fn entry() void { | ||
| 6 | try expectEqual(2, getSize()); | ||
| 7 | } | ||
| 8 | |||
| 9 | // error | ||
| 10 | // backend=stage2 | ||
| 11 | // target=native | ||
| 12 | // | ||
| 13 | // :6:31: error: unable to resolve comptime value | ||
| 14 | // :6:31: note: argument to parameter with comptime only type must be comptime known | ||