mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
25
samples/Terra/ordercomplete.t
Normal file
25
samples/Terra/ordercomplete.t
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
struct A {
|
||||
a : int
|
||||
}
|
||||
|
||||
struct B {
|
||||
a : A
|
||||
}
|
||||
|
||||
function A.metamethods.__staticinitialize()
|
||||
print("STATIC INIT A")
|
||||
local terra what(b : B)
|
||||
end
|
||||
what:gettype(true)
|
||||
end
|
||||
|
||||
function B.metamethods.__staticinitialize()
|
||||
print("STATIC INIT B")
|
||||
end
|
||||
|
||||
terra foo(b : B)
|
||||
end
|
||||
|
||||
foo:compile()
|
||||
Reference in New Issue
Block a user