Surface rename of the signed integer family: s1..s64 become i1..i64
(u1..u64, usize, isize unchanged). 'string' keeps the s-prefix arm in
name classification; width parsing moves to the i-prefix arm next to
isize.
Internal TypeId tags follow the surface (.s8/.s16/.s32/.s64 ->
.i8/.i16/.i32/.i64), as do mono-key mangle fragments (ptr_i64,
tu_i64_bool) and all display/diagnostic formatting (i{d}).
Migrated in the same sweep: stdlib + examples + issue repros + FFI C
companions (shared symbol names like ffi_id_i64), expected
stdout/stderr/ir snapshots, specs.md, readme.md, CLAUDE.md/AGENTS.md,
implementation_plan.md, docs/, issue writeups. Vendored stb_image and
historical flow state left untouched.
zig build test: 426/426; examples suite: 595/595.
48 lines
2.2 KiB
Plaintext
48 lines
2.2 KiB
Plaintext
error: type mismatch: constant 'N' is declared 'string' but its initializer is an integer literal
|
|
--> examples/1143-diagnostics-typed-module-const-mismatch.sx:24:15
|
|
|
|
|
24 | N : string : 4; // integer literal where a string is annotated
|
|
| ^
|
|
|
|
error: type mismatch: constant 'F' is declared 'i64' but its initializer is a string literal
|
|
--> examples/1143-diagnostics-typed-module-const-mismatch.sx:25:15
|
|
|
|
|
25 | F : i64 : "x"; // string literal where an integer is annotated
|
|
| ^^^
|
|
|
|
error: type mismatch: constant 'B' is declared 'i64' but its initializer is a boolean literal
|
|
--> examples/1143-diagnostics-typed-module-const-mismatch.sx:26:15
|
|
|
|
|
26 | B : i64 : true; // boolean literal where an integer is annotated
|
|
| ^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '1.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1143-diagnostics-typed-module-const-mismatch.sx:27:15
|
|
|
|
|
27 | G : i64 : 1.5; // float literal where an integer is annotated
|
|
| ^^^
|
|
|
|
error: type mismatch: constant 'E' is declared 'string' but its initializer is an integer expression
|
|
--> examples/1143-diagnostics-typed-module-const-mismatch.sx:28:15
|
|
|
|
|
28 | E : string : M + 2; // integer EXPRESSION where a string is annotated
|
|
| ^^^^^
|
|
|
|
error: type mismatch: constant 'V' is declared 'string' but its initializer is an integer expression
|
|
--> examples/1143-diagnostics-typed-module-const-mismatch.sx:29:15
|
|
|
|
|
29 | V : string : -M; // integer (unary) expression where a string is annotated
|
|
| ^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1143-diagnostics-typed-module-const-mismatch.sx:30:15
|
|
|
|
|
30 | BAD : i64 : M + 0.5; // mixed int+float (int LHS) → f64, rejected vs i64
|
|
| ^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1143-diagnostics-typed-module-const-mismatch.sx:31:15
|
|
|
|
|
31 | BAD2 : i64 : 0.5 + M; // mixed float+int (float LHS) → f64, rejected vs i64 — order-independent
|
|
| ^^^^^^^
|