Browse Source

Bugfix in preproc due to PTA syntax checks.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1925 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 16 years ago
parent
commit
f0826d03e0
  1. 2
      prism/src/parser/visitor/SemanticCheck.java

2
prism/src/parser/visitor/SemanticCheck.java

@ -360,7 +360,7 @@ public class SemanticCheck extends ASTTraverse
public void visitPost(ExpressionVar e) throws PrismLangException
{
// For PTAs, references to variables in modules have to be local
if (modulesFile.getModelType() == ModelType.PTA && module != null) {
if (modulesFile != null && modulesFile.getModelType() == ModelType.PTA && module != null) {
if (!module.isLocalVariable(e.getName())) {
throw new PrismLangException("Modules in a PTA cannot access non-local variables", e);
}

Loading…
Cancel
Save