allow %breakpoint also in if/else blocks and other anonymous scopes

This commit is contained in:
Irmen de Jong 2024-03-19 23:31:21 +01:00
parent c38765301e
commit 592becc126

View File

@ -825,7 +825,7 @@ internal class AstChecker(private val program: Program,
err("invalid import directive, cannot import itself")
}
"%breakpoint" -> {
if(directive.parent !is INameScope || directive.parent is Module)
if(directive.parent !is INameScope && directive.parent !is AnonymousScope || directive.parent is Module)
err("this directive can't be used here")
if(directive.args.isNotEmpty())
err("invalid breakpoint directive, expected no arguments")