Commit d411973e authored by Alfred Theorin's avatar Alfred Theorin
Browse files

Fixed NullPointerException in compiler for specifications using undefined usertypes.

parent df2a18ef
......@@ -9,7 +9,13 @@ aspect TypeCheck {
syn boolean Type.isNull();
eq Type.isNull() = false;
eq VoidType.isNull() = true;
eq UserType.isNull() = decl().isNull();
eq UserType.isNull() {
if (decl() != null) {
return decl().isNull();
} else {
return false;
}
}
syn boolean TypeDecl.isNull();
eq TypeDecl.isNull() = getType().isNull();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment