Add function calls and copy methods for type demonstrations in main.lua
This commit is contained in:
parent
89e36db5cb
commit
b8c35952cf
7
main.lua
7
main.lua
@ -36,6 +36,13 @@ print("Int add:", i + Types.Int(5))
|
|||||||
print("Float mul:", f * Types.Float(2.0))
|
print("Float mul:", f * Types.Float(2.0))
|
||||||
print("Str concat:", s .. Types.Str("!"))
|
print("Str concat:", s .. Types.Str("!"))
|
||||||
print("Bool eq:", b == Types.Bool(true))
|
print("Bool eq:", b == Types.Bool(true))
|
||||||
|
print("Int call:", i())
|
||||||
|
print("Float call:", f())
|
||||||
|
print("Str call:", s())
|
||||||
|
print("Bool call:", b())
|
||||||
|
print("Tuple call:", t())
|
||||||
|
print("Int copy:", i.copy())
|
||||||
|
print("Tuple copy:", t.copy())
|
||||||
|
|
||||||
attempt("Int mutate", function()
|
attempt("Int mutate", function()
|
||||||
i.value = 99
|
i.value = 99
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user