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:
Nathan Braswell
2016-02-25 05:16:50 -05:00
parent 40e3536e10
commit efebf8b1d7
3 changed files with 4 additions and 3 deletions

View File

@@ -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()

View File

@@ -1,4 +1,4 @@
import io:*;
import simple_print:*;
obj Vec2 {
var x: int;

View File

@@ -1,4 +1,4 @@
import io:*;
import simple_print:*;
import mem:*;
obj ClassWithConstructor {