fix(0111): unannotated decl literals no longer adopt the fn return type
lowerVarDecl (unannotated) and lowerDestructureDecl now clear target_type around the initializer lowering: a declaration without annotation provides no target, so int/float literals take their spec defaults (s64/f64) instead of the enclosing function's implicit-return type (x := 0 in a -> s8 fn was s8; big := 3000000000 in -> s32 silently wrapped to -1294967296). Regression: examples/0173-types-int-literal-default-s64.sx. The remaining explicit-annotation wrap (x : s8 = 300) is filed as issue 0112.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
f.x: s64
|
||||
g.x: s64
|
||||
big: s64 = 3000000000
|
||||
a: s64 b: s64
|
||||
main.x: s64
|
||||
Reference in New Issue
Block a user