mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
cases: update to new "called from here" notes
This commit is contained in:
parent
4296727050
commit
16481c8ef3
24 changed files with 30 additions and 60 deletions
|
|
@ -8,8 +8,6 @@ export fn entry() usize {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:14: error: overflow of integer type 'u16' with value '65540'
|
||||
// :1:14: note: called from here
|
||||
// :1:14: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -18,9 +18,7 @@ pub export fn entry() void {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :11:5: error: expected 0 argument(s), found 1
|
||||
// :1:12: note: function declared here
|
||||
// :17:19: note: called from here
|
||||
// :17:19: note: called inline here
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ export fn entry() usize {
|
|||
// error
|
||||
//
|
||||
// :3:16: error: division by zero here causes illegal behavior
|
||||
// :1:14: note: called from here
|
||||
// :1:14: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ pub fn bar() u8 {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :6:12: error: expected error union type, found 'u8'
|
||||
// :2:8: note: called from here
|
||||
// :2:8: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -22,4 +22,4 @@ comptime {
|
|||
//
|
||||
// :7:16: error: captured value contains reference to comptime var
|
||||
// :16:30: note: 'wrapper.ptr' points to comptime var declared here
|
||||
// :17:29: note: called from here
|
||||
// :17:29: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -15,9 +15,8 @@ export fn entry() void {
|
|||
}
|
||||
|
||||
// error
|
||||
// target=native
|
||||
//
|
||||
// :4:5: error: unreachable code
|
||||
// :4:25: note: control flow is diverted here
|
||||
// :4:25: error: aoeu
|
||||
// :1:36: note: called from here
|
||||
// :1:36: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ pub export fn entry() void {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :9:48: error: caught unexpected error 'InvalidVersion'
|
||||
// :?:?: note: error returned here
|
||||
|
|
@ -24,4 +22,4 @@ pub export fn entry() void {
|
|||
// :?:?: note: error returned here
|
||||
// :?:?: note: error returned here
|
||||
// :?:?: note: error returned here
|
||||
// :12:37: note: called from here
|
||||
// :12:37: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -25,5 +25,5 @@ fn Type(comptime n: usize) type {
|
|||
//
|
||||
// :21:16: error: evaluation exceeded 1001 backwards branches
|
||||
// :21:16: note: use @setEvalBranchQuota() to raise the branch limit from 1001
|
||||
// :16:34: note: called from here
|
||||
// :8:15: note: called from here
|
||||
// :16:34: note: called at comptime here
|
||||
// :8:15: note: generic function instantiated here
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ pub fn is(comptime id: std.builtin.TypeId) TraitFn {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :8:48: error: expected type 'type', found 'bool'
|
||||
// :5:21: note: called from here
|
||||
// :5:21: note: generic function instantiated here
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
// error
|
||||
// backend=stage2
|
||||
// target=x86_64-linux
|
||||
// output_mode=Exe
|
||||
//
|
||||
// : error: root source file struct 'tmp' has no member named 'main'
|
||||
// : note: struct declared here
|
||||
// : note: called from here
|
||||
// : note: called from here
|
||||
// : note: called inline here
|
||||
// : note: called inline here
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@ comptime {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :5:17: error: missing struct field: b
|
||||
// :1:11: note: struct declared here
|
||||
// :9:15: note: called from here
|
||||
// :9:15: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ export fn entry() usize {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:14: error: overflow of integer type 'u16' with value '1800000'
|
||||
// :1:14: note: called from here
|
||||
// :1:14: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ export fn entry() usize {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:12: error: overflow of integer type 'i8' with value '128'
|
||||
// :1:14: note: called from here
|
||||
// :1:14: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ fn makeLlamas(count: usize) [count]u8 {}
|
|||
//
|
||||
// :8:30: error: unable to resolve comptime value
|
||||
// :8:30: note: array length must be comptime-known
|
||||
// :2:31: note: called from here
|
||||
// :2:31: note: generic function instantiated here
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
fn main() void {}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=x86_64-linux
|
||||
// output_mode=Exe
|
||||
//
|
||||
// : error: 'main' is not marked 'pub'
|
||||
// :1:1: note: declared here
|
||||
// : note: called from here
|
||||
// : note: called from here
|
||||
// : note: called inline here
|
||||
// : note: called inline here
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ pub export fn entry2() void {
|
|||
// error
|
||||
//
|
||||
// :5:27: error: inline call is recursive
|
||||
// :12:12: note: called from here
|
||||
// :12:12: note: called inline here
|
||||
// :24:10: error: inline call is recursive
|
||||
// :20:10: note: called from here
|
||||
// :16:11: note: called from here
|
||||
// :28:10: note: called from here
|
||||
// :20:10: note: called inline here
|
||||
// :16:11: note: called inline here
|
||||
// :28:10: note: called inline here
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ fn assert(ok: bool) void {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :10:14: error: reached unreachable code
|
||||
// :6:20: note: called from here
|
||||
// :6:20: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@ comptime {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:12: error: expected type 'fn () void', found 'type'
|
||||
// :1:10: note: function return type declared here
|
||||
// :5:12: note: called from here
|
||||
// :5:12: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ var rt: u32 = undefined;
|
|||
// :10:12: note: call to function with comptime-only return type 'type' is evaluated at comptime
|
||||
// :13:10: note: return type declared here
|
||||
// :10:12: note: types are not available at runtime
|
||||
// :2:8: note: called from here
|
||||
// :2:8: note: called inline here
|
||||
// :19:8: error: unable to evaluate comptime expression
|
||||
// :19:5: note: operation is runtime due to this operand
|
||||
// :6:8: note: called at comptime from here
|
||||
|
|
|
|||
|
|
@ -18,9 +18,7 @@ export fn entry() void {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :13:30: error: expected type 'u32', found 'i32'
|
||||
// :13:30: note: unsigned 32-bit int cannot represent all possible signed 32-bit values
|
||||
// :17:33: note: called from here
|
||||
// :17:33: note: called inline here
|
||||
|
|
|
|||
|
|
@ -36,10 +36,9 @@ export fn d() callconv(.naked) noreturn {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
//
|
||||
// :2:5: error: local variable in naked function
|
||||
// :10:5: error: local variable in naked function
|
||||
// :23:5: error: local variable in naked function
|
||||
// :30:13: error: local variable in naked function
|
||||
// :35:12: note: called from here
|
||||
// :35:12: note: called inline here
|
||||
|
|
|
|||
|
|
@ -12,4 +12,4 @@ fn incr(x: *comptime_int) void {
|
|||
//
|
||||
// :8:9: error: store to comptime variable depends on runtime condition
|
||||
// :3:9: note: runtime condition here
|
||||
// :4:22: note: called from here
|
||||
// :4:22: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ export fn entry() usize {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:14: error: overflow of integer type 'u16' with value '-10'
|
||||
// :1:14: note: called from here
|
||||
// :1:14: note: called at comptime here
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ export fn entry() void {
|
|||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:9: error: reached unreachable code
|
||||
// :8:21: note: called from here
|
||||
// :8:21: note: called at comptime here
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue