Port 2 tests, fix object bug when generating methods (would try to generate the &object as a function itself for some reason, which worked when it wasn't special as generate_function would just return the name)
This commit is contained in:
@@ -481,7 +481,8 @@ obj c_generator (Object) {
|
||||
// don't add & if it was ->
|
||||
if (node->function_call.func->function_call.func->function.name == ".")
|
||||
call_string += "&"
|
||||
call_string += generate_function(node->function_call.func->function_call.parameters[0], false)
|
||||
// call_string += generate_function(node->function_call.func->function_call.parameters[0], false)
|
||||
call_string += generate_identifier(node->function_call.func->function_call.parameters[0], enclosing_object, enclosing_func)
|
||||
} else {
|
||||
// regular style function name or lambda
|
||||
func_name = generate_function(node->function_call.func, false).one_string()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import io:*;
|
||||
import simple_print:*;
|
||||
|
||||
obj Vec2 {
|
||||
var x: int;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import io:*;
|
||||
import simple_print:*;
|
||||
import mem:*;
|
||||
|
||||
obj ClassWithConstructor {
|
||||
|
||||
Reference in New Issue
Block a user