Copy construct into function calls

This commit is contained in:
Nathan Braswell
2016-01-30 23:59:21 -05:00
parent 83450aa833
commit ab5250bd0b
2 changed files with 23 additions and 3 deletions

View File

@@ -32,6 +32,10 @@ obj Something (ObjectTrait) {
return this;
}
}
fun return_something_p_1(it: Something): Something {
it.member += 11
return it
}
/*
fun some_function(): int return 0;
fun some_other_function(in: bool): float {
@@ -47,6 +51,8 @@ fun main(): int {
var second_obj = test_methods
second_obj.member += 5
simple_println(second_obj.member)
/*var some = return_something_p_1(second_obj)*/
simple_println(return_something_p_1(second_obj).member)
return 0
/*
var a_declaration:int