mirror of
https://github.com/irmen/prog8.git
synced 2024-11-22 00:31:56 +00:00
fix a type error
This commit is contained in:
parent
1a6b95b388
commit
7651ccc84e
@ -135,7 +135,9 @@ internal class VariousCleanups(val program: Program, val errors: IErrorReporter,
|
||||
}
|
||||
|
||||
if(isMultiComparisonRecurse(leftBinExpr1)) {
|
||||
val elementType = needle.inferType(program).getOrElse { throw FatalAstException("invalid needle dt") }
|
||||
val elementIType = needle.inferType(program)
|
||||
if(elementIType.isUnknown) return noModifications
|
||||
val elementType = elementIType.getOrElse { DataType.UNDEFINED }
|
||||
if(values.size==2 || values.size==3 && (elementType==DataType.UBYTE || elementType==DataType.UWORD)) {
|
||||
val numbers = values.map{it.number}.toSet()
|
||||
if(numbers == setOf(0.0, 1.0)) {
|
||||
|
Loading…
Reference in New Issue
Block a user