Inference/src/TypeSystem/ClassTypeProxy.cs
/// <summary>
/// Implements the unfold operation of theoretical type systems.
/// It the real subject has not been created, it is expanded in one level of recursion.
/// </summary>
Implements the unfold operation of theoretical type systems.
It the real subject has not been created, it is expanded in one level of recursion.
Implements the unfold operation of theoretical type systems . It the real subject has not been created it is expanded in one level of recursion .
private void unfold() {
            if (this.realType == null) {
                this.realType = (ClassType)this.originalClass.CloneTypeVariables(this.typeVariableMappings, this.equivalenceClasses, new List<ClassType>());
                foreach (EquivalenceClass equivalenceClass in new List<EquivalenceClass>(equivalenceClasses))
                    equivalenceClass.UpdateEquivalenceClass(typeVariableMappings);
                this.realType.ValidTypeExpression = false;
            }
        }
private void unfold ( ) { if ( this . realType == null ) { this . realType = ( ClassType ) this . originalClass . CloneTypeVariables ( this . typeVariableMappings , this . equivalenceClasses , new List < ClassType > ( ) ) ; foreach ( EquivalenceClass equivalenceClass in new List < EquivalenceClass > ( equivalenceClasses ) ) equivalenceClass . UpdateEquivalenceClass ( typeVariableMappings ) ; this . realType . ValidTypeExpression = false ; } }
Implements the unfold operation of theoretical type systems.
Implements the unfold operation of theoretical type systems .
// * For each equivalence class we create a new one,  //   substituting the old type variables for the new ones // * The substitution is not altered // * Since equivalence classes and type variables have a bidirectional association, //   the new equivalence classes will make type variables update their new equivalence classes                 // * The new class type is returned