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.
42 lines
1.9 KiB
Plaintext
42 lines
1.9 KiB
Plaintext
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1147-diagnostics-float-division-narrowing.sx:31:11
|
|
|
|
|
31 | K : i64 : 5.0 / 2.0; // 2.5 non-integral float-DIVISION const → error
|
|
| ^^^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1147-diagnostics-float-division-narrowing.sx:40:19
|
|
|
|
|
40 | local : i64 = 5.0 / 2.0; // non-integral float-DIVISION local → error
|
|
| ^^^^^^^^^
|
|
|
|
error: array dimension must be an integer, but '2.5' is a non-integral float
|
|
--> examples/1147-diagnostics-float-division-narrowing.sx:41:12
|
|
|
|
|
41 | dim : [5.0 / 2.0]i64 = ---; // non-integral float-DIVISION array dimension → error
|
|
| ^^^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1147-diagnostics-float-division-narrowing.sx:42:18
|
|
|
|
|
42 | cdiv : i64 = ME / 2; // untyped float-EXPR const division (5.0/2 = 2.5) → error
|
|
| ^^^^^^
|
|
|
|
error: array dimension must be an integer, but '2.5' is a non-integral float
|
|
--> examples/1147-diagnostics-float-division-narrowing.sx:43:13
|
|
|
|
|
43 | cdim : [ME / 2]i64 = ---; // same, at the count path → error
|
|
| ^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1147-diagnostics-float-division-narrowing.sx:34:15
|
|
|
|
|
34 | f : i64 = 5.0 / 2.0; // non-integral float-DIVISION field default → error
|
|
| ^^^^^^^^^
|
|
|
|
error: cannot implicitly narrow non-integral float '2.5' to 'i64'; use an explicit cast (`xx`/`cast`)
|
|
--> examples/1147-diagnostics-float-division-narrowing.sx:37:24
|
|
|
|
|
37 | badParam :: (x : i64 = 5.0 / 2.0) -> i64 { return x; } // float-DIVISION param default → error
|
|
| ^^^^^^^^^
|