diff --git a/compilerAst/src/prog8/ast/statements/AstStatements.kt b/compilerAst/src/prog8/ast/statements/AstStatements.kt index 41638d5d4..8e62da38f 100644 --- a/compilerAst/src/prog8/ast/statements/AstStatements.kt +++ b/compilerAst/src/prog8/ast/statements/AstStatements.kt @@ -130,7 +130,7 @@ data class Label(override val name: String, override val position: Position) : S override fun toString()= "Label(name=$name, pos=$position)" } -class Return(var value: Expression?, final override val position: Position) : Statement() { +class Return(var value: Expression?, override val position: Position) : Statement() { override lateinit var parent: Node override fun linkParents(parent: Node) { @@ -181,7 +181,7 @@ class VarDecl(val type: VarDeclType, val autogeneratedDontRemove: Boolean, val sharedWithAsm: Boolean, val subroutineParameter: SubroutineParameter?, - final override val position: Position) : Statement(), INamedStatement { + override val position: Position) : Statement(), INamedStatement { override lateinit var parent: Node var allowInitializeWithZero = true @@ -299,7 +299,7 @@ class ArrayIndex(var indexExpr: Expression, override fun copy() = ArrayIndex(indexExpr.copy(), position) } -class Assignment(var target: AssignTarget, var value: Expression, final override val position: Position) : Statement() { +class Assignment(var target: AssignTarget, var value: Expression, override val position: Position) : Statement() { override lateinit var parent: Node override fun linkParents(parent: Node) { diff --git a/compilerAst/src/prog8/ast/walk/AstWalker.kt b/compilerAst/src/prog8/ast/walk/AstWalker.kt index aeacf1160..fc8c23cb1 100644 --- a/compilerAst/src/prog8/ast/walk/AstWalker.kt +++ b/compilerAst/src/prog8/ast/walk/AstWalker.kt @@ -233,7 +233,7 @@ abstract class AstWalker { fun visit(containment: ContainmentCheck, parent: Node) { track(before(containment, parent), containment, parent) containment.element.accept(this, containment) - containment.iterable?.accept(this, containment) + containment.iterable.accept(this, containment) track(after(containment, parent), containment, parent) } diff --git a/compilerInterfaces/src/prog8/compilerinterface/Zeropage.kt b/compilerInterfaces/src/prog8/compilerinterface/Zeropage.kt index f972613ae..8950af059 100644 --- a/compilerInterfaces/src/prog8/compilerinterface/Zeropage.kt +++ b/compilerInterfaces/src/prog8/compilerinterface/Zeropage.kt @@ -50,7 +50,7 @@ abstract class Zeropage(protected val options: CompilationOptions) { if(position!=null) errors.warn("allocated a large value (float) in zeropage", position) else - errors.warn("$scopedname: allocated a large value (float) in zeropage", position ?: Position.DUMMY) + errors.warn("$scopedname: allocated a large value (float) in zeropage", Position.DUMMY) options.compTarget.machine.FLOAT_MEM_SIZE } else throw InternalCompilerException("floating point option not enabled") }