Add function calls and copy methods for type demonstrations in main.lua

This commit is contained in:
Chipperfluff 2026-01-01 18:34:25 +01:00
parent 89e36db5cb
commit b8c35952cf

View File

@ -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