A little more work on function inference, fixed both Cephalapod and Kalypso's c generators to not accidentally emit this-> for a method param if the object has a var of the same name, which allows us to disambiguate with object_name::member = param_with_same_name, behavior I had not thought of but would have worked out of the box if not for this accidental bug
This commit is contained in:
@@ -243,7 +243,7 @@ obj c_generator (Object) {
|
||||
return to_ret
|
||||
}
|
||||
fun generate_identifier(node: *ast_node, enclosing_object: *ast_node): code_triple {
|
||||
if (enclosing_object && get_ast_scope(enclosing_object)->contains_key(node->identifier.name))
|
||||
if (enclosing_object && get_ast_scope(enclosing_object)->contains_key(node->identifier.name) && get_ast_scope(enclosing_object)->get(node->identifier.name).contains(node))
|
||||
return code_triple("(this->") + node->identifier.name + ")"
|
||||
return code_triple(node->identifier.name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user