mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-22 15:30:06 +00:00
14 lines
241 B
Plaintext
14 lines
241 B
Plaintext
// crafts a dummy proto
|
|
proto test end
|
|
|
|
// instance of test
|
|
var obj = test()
|
|
|
|
test.__index = function(self, key)
|
|
print("__index called!")
|
|
if (key == "lol") then
|
|
return 9001
|
|
end
|
|
end
|
|
|
|
print(obj["lol"]) // should print 9001? |