Skip to content

Commit

Permalink
And allow ! types for imports of inv_T
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Dec 1, 2023
1 parent 7b509ab commit a8d65ee
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion vdmj/src/main/java/com/fujitsu/vdmj/syntax/ModuleReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,19 @@ private ASTImportedFunction readImportedFunction(LexIdentifierToken from)
if (lastToken().is(Token.COLON))
{
nextToken();
type = getTypeReader().readType();

// Allow maximal ! for inv_T functions
boolean saved = Properties.parser_maximal_types;

try
{
Properties.parser_maximal_types = true;
type = getTypeReader().readType();
}
finally
{
Properties.parser_maximal_types = saved;
}
}

LexNameToken renamed = null;
Expand Down

0 comments on commit a8d65ee

Please sign in to comment.