// Valid typed module-level constants compile, fold, and print correctly across // every initializer/annotation pairing the registrar accepts: // - integer → integer (`K : s64 : 4`) — usable as an array count too // - integer → float (`W : f32 : 800`) // - float → float (`PI : f32 : 3.14159`) // - string → string (`S : string : "hi"`) // - null → pointer (`P : *void : null`) // // Companion to the negative example 1143: the issue-0088 fix rejects a typed // const whose initializer mismatches its annotation, and these correctly-typed // consts must keep working (no over-rejection). #import "modules/std.sx"; K : s64 : 4; W : f32 : 800; PI : f32 : 3.14159; S : string : "hi"; P : *void : null; main :: () { // Integer const: prints AND drives an array dimension (len 4). a : [K]s64 = ---; a[0] = 10; a[3] = 40; print("K={} len={} a0={} a3={}\n", K, a.len, a[0], a[3]); // Integer-into-float and float consts print as floats. print("W={} PI={}\n", W, PI); // String const prints its text. print("S={}\n", S); // Null pointer const is null. print("P_is_null={}\n", P == null); }