diff --git a/compiler/src/prog8/compiler/astprocessing/LiteralsToAutoVars.kt b/compiler/src/prog8/compiler/astprocessing/LiteralsToAutoVars.kt index 326e80d9f..82a4c0970 100644 --- a/compiler/src/prog8/compiler/astprocessing/LiteralsToAutoVars.kt +++ b/compiler/src/prog8/compiler/astprocessing/LiteralsToAutoVars.kt @@ -49,6 +49,8 @@ internal class LiteralsToAutoVars(private val program: Program, private val erro } } else { val arrayDt = array.guessDatatype(program) + if(arrayDt.isUnknown) + return noModifications val elementDt = ArrayToElementTypes.getValue(arrayDt.getOr(DataType.UNDEFINED)) val maxSize = when(elementDt) { in ByteDatatypesWithBoolean -> PtContainmentCheck.MAX_SIZE_FOR_INLINE_CHECKS_BYTE