Added automatic distructor calling for going out of scope, found out that += is broken (and just comes through as =)

This commit is contained in:
Nathan Braswell
2016-01-29 22:46:09 -05:00
parent da38ae03ed
commit 6f1f31a212
5 changed files with 353 additions and 331 deletions

View File

@@ -17,8 +17,8 @@ obj Something (ObjectTrait) {
member = old->member
}
fun destruct() {
simple_println("Destructing a Something")
member = -800
simple_print("Destructing a Something: ")
simple_println(member)
}
fun method(a: int):int {
return 5+a+member + other_method()
@@ -107,6 +107,7 @@ fun main(): int {
simple_println(test_methods.member)
simple_println(test_methods_param.member)
var second_obj = test_methods
second_obj.member += 5
simple_println(second_obj.member)
return 0
}