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.
72 lines
3.5 KiB
Plaintext
72 lines
3.5 KiB
Plaintext
error: cannot implicitly narrow non-integral float '1.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:40:16
|
|
|
|
|
40 | y : i64 = 1.5; // non-integral float LITERAL local → error
|
|
| ^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:41:16
|
|
|
|
|
41 | ye : i64 = M + 0.5; // non-integral int-const-EXPRESSION local → error
|
|
| ^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.75' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:42:16
|
|
|
|
|
42 | yf : i64 = F + 0.25; // non-integral float-const-LEAF local → error
|
|
| ^^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '0.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:43:16
|
|
|
|
|
43 | yn : i64 = f64.true_min + 0.5; // non-integral numeric-limit float expr → error
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '1.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:44:16
|
|
|
|
|
44 | ym : i64 = 5.5 % 2.0; // non-integral float `%` remainder (1.5) → error
|
|
| ^^^^^^^^^
|
|
|
|
error: array dimension must be an integer, but '2.75' is a non-integral float
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:45:11
|
|
|
|
|
45 | ad : [F + 0.25]i64 = ---; // non-integral float-const-LEAF array DIMENSION → error
|
|
| ^^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '3.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:30:16
|
|
|
|
|
30 | f : i64 = 3.5; // non-integral float LITERAL field default → error
|
|
| ^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:31:16
|
|
|
|
|
31 | fe : i64 = M + 0.5; // non-integral int-const-EXPR field default → error
|
|
| ^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.75' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:32:16
|
|
|
|
|
32 | ff : i64 = F + 0.25; // non-integral float-const-LEAF field default → error
|
|
| ^^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:35:23
|
|
|
|
|
35 | badLit :: (x : i64 = 2.5) -> i64 { return x; } // non-integral LITERAL param default → error
|
|
| ^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:36:23
|
|
|
|
|
36 | badExpr :: (x : i64 = M + 0.5) -> i64 { return x; } // non-integral int-const-EXPR param default → error
|
|
| ^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.75' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1146-diagnostics-nonintegral-float-to-int.sx:37:23
|
|
|
|
|
37 | badFlt :: (x : i64 = F + 0.25) -> i64 { return x; } // non-integral float-const-LEAF param default → error
|
|
| ^^^^^^^^
|