Skip to content

Commit

Permalink
Improve inaccessible VDM++ member errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Jan 13, 2024
1 parent 2bd9fb0 commit 2b3dfdd
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,15 @@ public void listAlternatives(TCNameToken name)
{
if (possible.isFunctionOrOperation())
{
TypeChecker.detail("Possible", possible.name);
boolean accessible = TCClassDefinition.isAccessible(this, possible, false);
String tag = "Possible";

if (!accessible)
{
tag = tag + " (but " + possible.accessSpecifier + ")";
}

TypeChecker.detail(tag, possible.name);
}
}
}
Expand Down

0 comments on commit 2b3dfdd

Please sign in to comment.