Files
linguist/samples/Terra/customtable.t
2016-01-28 11:22:27 +07:00

10 lines
172 B
Perl

struct A {
}
A.metamethods.__luametatable = { __index = function(self,idx) return 4 end }
A.methods.foo = function() return 5 end
a = terralib.new(A)
assert(a.foo == 4)