|
|
@ -1792,6 +1792,24 @@ compile(x)
|
|
|
|
x()
|
|
|
|
x()
|
|
|
|
print 'Test 83 OK'
|
|
|
|
print 'Test 83 OK'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Test that ~ applied to non integer result in any type
|
|
|
|
|
|
|
|
-- issue #209
|
|
|
|
|
|
|
|
function x(x:number)
|
|
|
|
|
|
|
|
return (~x)+1
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
check(x, 'TOFLT', 'BNOT', 'ADD', 'RETURN', 'RETURN')
|
|
|
|
|
|
|
|
assert(x(1.0) == -1)
|
|
|
|
|
|
|
|
compile(x)
|
|
|
|
|
|
|
|
assert(x(1.0) == -1)
|
|
|
|
|
|
|
|
print 'Test 84 OK'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Test that #() applied to non integer type produces any type
|
|
|
|
|
|
|
|
-- issue #210
|
|
|
|
|
|
|
|
function x(x:integer[])
|
|
|
|
|
|
|
|
return #(x[1])+1
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
check(x, 'TOIARRAY', 'IARRAY_GET', 'LEN', 'ADD', 'RETURN', 'RETURN')
|
|
|
|
|
|
|
|
print 'Test 85 OK'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for k,v in pairs(opcodes_coverage)
|
|
|
|
for k,v in pairs(opcodes_coverage)
|
|
|
|