Commit 02cea810

02cea8108166Merged

sacckey <[email protected]> · 6 months ago · 1 file · ~1 modified

Description

fix(codegen): apply lexical scope when inferring module ivar initializer types

Details

Commit
02cea8108166
Parent
90bf02b07f53

spinel_codegen.rbmodifiedView file

@@ -4594,7 +4594,10 @@
45944594 expr_id = @nd_expression[sid]
45954595 ct = "int"
45964596 if expr_id >= 0
4597+ old_scope = @current_lexical_scope
4598+ @current_lexical_scope = mname
45974599 ct = infer_type(expr_id)
4600+ @current_lexical_scope = old_scope
45984601 end
45994602 @const_names.push(cname2)
46004603 @const_types.push(ct)