|
|
||
|
On 05/17/2014 04:36 AM, Coda Highland wrote:
As soon as any static analizer hits a function call, it wont be able to decide this anyway.That's not true, a sufficiently complex static analyzer can define inference rules for the return type of a function in terms of its parameters. I spent a lot of time bashing ACL2 into listening to me. :P /s/ Adam
This is just possible for some Lua code, not for all, look at this:
local int = true
function test ()
int = not int
if int then
return 1
else
return 1.0
end
end
while true do
print(test())
yield()
end
--
Thomas