when zp option = dontuse, print error for any variable with @requirezp

This commit is contained in:
Irmen de Jong 2022-01-16 18:13:24 +01:00
parent bf71fabe0e
commit de7ea04f54
2 changed files with 4 additions and 1 deletions

View File

@ -640,6 +640,9 @@ internal class AstChecker(private val program: Program,
err("string var can only be initialized with a string literal") err("string var can only be initialized with a string literal")
} }
if(compilerOptions.zeropage==ZeropageType.DONTUSE && decl.zeropage==ZeropageWish.REQUIRE_ZEROPAGE)
err("zeropage usage has been disabled by options")
super.visit(decl) super.visit(decl)
} }

View File

@ -3,7 +3,7 @@ TODO
For next compiler release (7.7) For next compiler release (7.7)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- if zp option = dontuse, give error if any variable has @requirezp ...
Need help with Need help with
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^