diff --git a/compilerAst/src/prog8/ast/Program.kt b/compilerAst/src/prog8/ast/Program.kt index 1f873bb18..aceb30bd9 100644 --- a/compilerAst/src/prog8/ast/Program.kt +++ b/compilerAst/src/prog8/ast/Program.kt @@ -134,7 +134,7 @@ class Program(val name: String, .first { it.name == internedStringsModuleName }.statements .first { it is Block && it.name == internedStringsModuleName } as Block removals.forEach { scopedname -> - val decl = internedStringsBlock.statements.filterIsInstance().single { decl -> decl.scopedName == scopedname } as VarDecl + val decl = internedStringsBlock.statements.filterIsInstance().single { decl -> decl.scopedName == scopedname } val numRefs = program.internedStringsReferenceCounts.getValue(decl) - 1 program.internedStringsReferenceCounts[decl] = numRefs if(numRefs==0) diff --git a/docs/source/todo.rst b/docs/source/todo.rst index db28a8ee2..9572fcc25 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -2,6 +2,12 @@ TODO ==== - fix type error with returning an array literal from a subroutine returning uword +- fix IR loading of romsubs + romsub $FFD2 = chrout(ubyte ch @ A) + sub start() { + ubyte ch = '\n' + chrout(ch) + } ...