mirror of
https://github.com/irmen/prog8.git
synced 2024-11-18 19:12:44 +00:00
fix compiler crash with scoped const vardecls
This commit is contained in:
parent
e93701f50e
commit
329f491c30
@ -78,7 +78,7 @@ internal class BeforeAsmGenerationAstChanger(val program: Program, val errors: I
|
||||
}
|
||||
|
||||
override fun after(scope: AnonymousScope, parent: Node): Iterable<IAstModification> {
|
||||
val decls = scope.statements.filterIsInstance<VarDecl>()
|
||||
val decls = scope.statements.filterIsInstance<VarDecl>().filter { it.type == VarDeclType.VAR }
|
||||
subroutineVariables.addAll(decls.map { it.name to it })
|
||||
|
||||
val sub = scope.definingSubroutine()
|
||||
|
@ -1,11 +1,10 @@
|
||||
%import textio
|
||||
%zeropage dontuse
|
||||
|
||||
main {
|
||||
uword hash_buckets = memory("buckets", 128*32*2)
|
||||
|
||||
sub start() {
|
||||
txt.print_uwhex(hash_buckets,true)
|
||||
txt.print("ok")
|
||||
sub start() {
|
||||
if cx16.r0 {
|
||||
const ubyte buffer_length = 255 ; less than 256
|
||||
ubyte[255] buffer
|
||||
ubyte[buffer_length] buffer2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user