2013-11-10 18:12:43 +00:00
|
|
|
Variable x : Int
|
|
|
|
|
2013-11-13 00:05:46 +00:00
|
|
|
(**
|
2013-11-10 18:12:43 +00:00
|
|
|
-- Add a variable to the environment using Lua
|
|
|
|
-- The type of the new variable is equal to the type
|
|
|
|
-- of x
|
|
|
|
typeofx = env():check_type(Const("x"))
|
|
|
|
print("type of x is " .. tostring(typeofx))
|
|
|
|
env():add_var("y", typeofx)
|
2013-11-13 00:05:46 +00:00
|
|
|
**)
|
2013-11-10 18:12:43 +00:00
|
|
|
|
|
|
|
Check x + y
|