Closed Zash closed 6 years ago
Same issue.
There are 2 lines in tlfilter.filter_falsy
where tltype.isFalse
and tltype.isTrue
are called without arguments (this causes an error). This:
lf[#lf+1] = tltype.False()
l[#l+1] = tltype.True()
seems to fix the problem, but I'm not sure I correctly understand the code.
Now there is a different error:
lua: ./typedlua/tltype.lua:246: attempt to index local 't1' (a boolean value)
stack traceback:
./typedlua/tltype.lua:246: in function 'isUnion'
./typedlua/tltype.lua:193: in function 'Union'
./typedlua/tlfilter.lua:70: in function 'f'
./typedlua/tlfilter.lua:291: in function 'f'
./typedlua/tlfilter.lua:291: in function 'filter'
./typedlua/tlchecker.lua:550: in function 'apply_filters'
./typedlua/tlchecker.lua:1451: in function <./typedlua/tlchecker.lua:1425>
(...tail calls...)
./typedlua/tlchecker.lua:1877: in function 'check_stms'
./typedlua/tlchecker.lua:1895: in function 'check_block'
./typedlua/tlchecker.lua:1271: in function <./typedlua/tlchecker.lua:1244>
(...tail calls...)
./typedlua/tlchecker.lua:1877: in function 'check_stms'
./typedlua/tlchecker.lua:1946: in function 'typecheck'
./tlc:138: in main chunk
[C]: in ?
Sorry, it was a stupid mistake, should be fixed now. Hey @andremm, we need to add a test case for these so there are no more regressions.
@Zash thanks for pointing out this issue, @Penguinum thanks for reminding us to fix that, and @mascarenhas thanks for fixing it!
I just pushed two test cases for avoiding regressions on this.
This file:
gives this traceback:
git bisect
says 5c80570559060eed88473f9c3c1850719e7502e3 broke it.