Make --parse-only not highlight and redo format of parse errors so that kraken.vim syntax checking works, fix naming to allow multiple instantiations of object templates, fix so that template type replacements go through to bodies of methods of object templates in the fourth_pass
This commit is contained in:
23
tests/test_obj_create_scope.krak
Normal file
23
tests/test_obj_create_scope.krak
Normal file
@@ -0,0 +1,23 @@
|
||||
import simple_print:*
|
||||
|
||||
obj ConTest {
|
||||
var a: int
|
||||
fun construct(a: int): *ConTest {
|
||||
ConTest::a = a
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
fun main(): int {
|
||||
var b.construct(7): ConTest
|
||||
println(b.a)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user