mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
parent
b937a04560
commit
648d34d8ea
@ -6738,6 +6738,8 @@ fn analyzeGenericCallArg(
|
||||
try sema.queueFullTypeResolution(param_ty);
|
||||
runtime_args[runtime_i.*] = casted_arg;
|
||||
runtime_i.* += 1;
|
||||
} else if (try sema.typeHasOnePossibleValue(block, arg_src, comptime_arg.ty)) |_| {
|
||||
_ = try sema.coerce(block, comptime_arg.ty, uncasted_arg, arg_src);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
fn bar(a: anytype, _: @TypeOf(a)) void {}
|
||||
pub export fn entry() void {
|
||||
bar(@as(u0, 0), "fooo");
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:21: error: expected type 'u0', found '*const [4:0]u8'
|
||||
Loading…
x
Reference in New Issue
Block a user