Make this varaiable/keyword work
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
import to_import: simple_print, a, b
|
||||
import to_import: simple_print, a, b, string_id
|
||||
|
||||
obj Something (ObjectTrait) {
|
||||
var member: int
|
||||
fun method(a: int):int {
|
||||
return 5+a+member
|
||||
}
|
||||
fun return_this(): *Something {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/*fun some_function(): int return 0;*/
|
||||
@@ -46,6 +49,10 @@ fun main(): int {
|
||||
simple_print("\n")
|
||||
simple_print(an_obj.method(1))
|
||||
simple_print("\n")
|
||||
simple_print(string_id("WoooopsEee\n"))
|
||||
var with_ptr = an_obj.return_this()
|
||||
simple_print(with_ptr->method(2))
|
||||
simple_print("\n")
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user