Just decided not to support defs in Kalypso (or Cephelapod, but it's already kinda implemented there) and ported some more tests over
This commit is contained in:
@@ -360,7 +360,8 @@ obj c_generator (Object) {
|
||||
func_name = generate(node->function_call.func, enclosing_object, null<stack<pair<bool,stack<*ast_node>>>>()).one_string()
|
||||
}
|
||||
// handle method call from inside method of same object
|
||||
if (!dot_style_method_call && enclosing_object && get_ast_scope(enclosing_object)->contains_key(func_name))
|
||||
/*if (!dot_style_method_call && enclosing_object && get_ast_scope(enclosing_object)->contains_key(func_name))*/
|
||||
if (!dot_style_method_call && enclosing_object && enclosing_object->type_def.methods.contains(node->function_call.func))
|
||||
call_string += "this"
|
||||
|
||||
var parameters = node->function_call.parameters
|
||||
|
||||
@@ -11,9 +11,7 @@ obj firstObject {
|
||||
}
|
||||
};
|
||||
|
||||
def Int int;
|
||||
|
||||
var aliasNum: Int;
|
||||
var aliasNum: int;
|
||||
|
||||
fun main(): int {
|
||||
var wooObject: firstObject;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import io:*;
|
||||
import simple_print:*;
|
||||
import trivial_container:*;
|
||||
|
||||
obj RegularObject {
|
||||
@@ -17,8 +17,7 @@ obj RegularObject {
|
||||
}
|
||||
};
|
||||
|
||||
def MyIntContainer trivialContainer<int>;
|
||||
var roundabout: MyIntContainer;
|
||||
var roundabout: trivialContainer<int>;
|
||||
var outsideDec: RegularObject;
|
||||
|
||||
fun print(toPrint: trivialContainer<*char>): void {
|
||||
|
||||
@@ -17,9 +17,8 @@ obj TemplateTest<T> {
|
||||
}
|
||||
};
|
||||
|
||||
def MyInt int;
|
||||
|
||||
var c: MyInt;
|
||||
var c: int;
|
||||
|
||||
|
||||
fun addAndPrint<T>(a: T, b: T): T {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import io;
|
||||
import simple_print;
|
||||
|
||||
obj trivialContainer<T> {
|
||||
var data: T;
|
||||
fun print(): void {
|
||||
io::print(data);
|
||||
simple_print::print(data);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user