diff --git a/vdmj/src/main/java/com/fujitsu/vdmj/values/visitors/ExplicitValueVisitor.java b/vdmj/src/main/java/com/fujitsu/vdmj/values/visitors/ExplicitValueVisitor.java index fffee4403..2690dd626 100644 --- a/vdmj/src/main/java/com/fujitsu/vdmj/values/visitors/ExplicitValueVisitor.java +++ b/vdmj/src/main/java/com/fujitsu/vdmj/values/visitors/ExplicitValueVisitor.java @@ -35,8 +35,8 @@ import com.fujitsu.vdmj.values.Value; /** - * This visitor produces a toString of a value, with any named types expanded - * to be explicit if they are not within the current module. + * This visitor produces a toString of a value, with any record values expanded + * to be explicit (like mk_A`R) if they are not within the "from" module. */ public class ExplicitValueVisitor extends ValueVisitor { @@ -48,6 +48,11 @@ public String caseValue(Value node, LexLocation arg) public String caseMapValue(MapValue node, LexLocation from) { + if (node.values.isEmpty()) + { + return "{|->}"; + } + StringBuilder sb = new StringBuilder(); sb.append("{"); String prefix = "";