X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftypes%2FTMetaVar.java;h=1596467bc2931541350fdfd0fd27a424e084e882;hp=00b289f46a1f1b934c5ab271386fedde11f38554;hb=5bed099be36a76e204265abb2f471d84050c0d66;hpb=6570cdea204ffa0b6a4e16ac12778fab883b49ec diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TMetaVar.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TMetaVar.java index 00b289f46..1596467bc 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TMetaVar.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TMetaVar.java @@ -92,10 +92,12 @@ public class TMetaVar extends Type { @Override public TypeAst toTypeAst(TypeUnparsingContext context) { - if(ref == null) - return new TVarAst(/*polarity.getSymbol() +*/ context.getName(this)); - else + if(ref != null) return ref.toTypeAst(context); + else if(context.showSkeletons && skeletonRef != null) + return skeletonRef.toTypeAst(context); + else + return new TVarAst(/*polarity.getSymbol() +*/ context.getName(this)); } @Override @@ -168,6 +170,10 @@ public class TMetaVar extends Type { // Common case if(skeletonRef != null) { Skeletons.unifySkeletons(thisSkeleton, type); + if(ref != null) { + Types.unify(this, type); + return; + } } setRefBase(type); }