mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-14 13:25:50 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
9
samples/Terra/staticmethod.t
Normal file
9
samples/Terra/staticmethod.t
Normal file
@@ -0,0 +1,9 @@
|
||||
struct A {
|
||||
}
|
||||
A.metamethods.__getmethod = function(self,idx)
|
||||
return tonumber(string.sub(idx,2,-1))
|
||||
end
|
||||
terra foo()
|
||||
return A.f33 + A.b34
|
||||
end
|
||||
assert(67 == foo())
|
||||
Reference in New Issue
Block a user