Closed raould closed 9 years ago
You are not getting a type error because you are redeclaring m
with type any
. You may want to write main.tl
as follows:
local m = require "draw"
function loop()
for i = 1, 3 do
m.foo( i ) -- now you have a type error,
-- because (number, nil*) does not match (any, number, value*),
-- which is the input type of m.foo
end
end
loop()
Ok, I will try to comprehend, thanks for the info!
Please see https://github.com/raould/typedlua/tree/master/QUESTIONS/1 for runnable (linux) example. The gist of it is that I'd like a "missing" argument to be flagged, but it isn't in the case demo'd in the linked code.