You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Add variable type inference for struct initializers
- Add variable_types HashMap to TypedAstBuilder to track declared variable types
- Update create_var_decl to infer type from initializer expression and register it
- Update create_variable to look up registered type for proper variable references
- Update create_field_access to infer field type from object's struct type
This enables proper type propagation for struct field access through variables:
const p = Point{ .x = 10, .y = 20 };
return p.x; // Now correctly returns 10
0 commit comments