Microsoft.JScript.Class.GetIRForSuperType C# (CSharp) Method

GetIRForSuperType() private method

private GetIRForSuperType ( ) : void
return void
      private void GetIRForSuperType(){
        IReflect supIR = this.superIR = Typeob.Object;
        if (this.superTypeExpression != null){
          this.superTypeExpression.PartiallyEvaluate();
          supIR = this.superIR = this.superTypeExpression.ToIReflect();
        }
        Type supType = supIR as Type;
        if (supType != null){
          if (supType.IsSealed || supType.IsInterface || supType == Typeob.ValueType || supType == Typeob.ArrayObject){
            if (this.superTypeExpression.Evaluate() is Namespace)
              this.superTypeExpression.context.HandleError(JSError.NeedType);
            else
              this.superTypeExpression.context.HandleError(JSError.TypeCannotBeExtended, supType.FullName);
            this.superTypeExpression = null;
            this.superIR = Typeob.Object;
          }else if (Typeob.INeedEngine.IsAssignableFrom(supType))
            this.needsEngine = false;
        }else if (supIR is ClassScope){
          if (((ClassScope)supIR).owner.IsASubClassOf(this)){
            this.superTypeExpression.context.HandleError(JSError.CircularDefinition);
            this.superTypeExpression = null;
            this.superIR = Typeob.Object;
          }else{
            this.needsEngine = false;
            this.superClass = ((ClassScope)supIR).owner;
            if ((this.superClass.attributes & TypeAttributes.Sealed) != 0){
              this.superTypeExpression.context.HandleError(JSError.TypeCannotBeExtended, this.superClass.name);
              this.superClass.attributes &= ~TypeAttributes.Sealed;
              this.superTypeExpression = null;
            }else if (this.superClass.isInterface){
              this.superTypeExpression.context.HandleError(JSError.TypeCannotBeExtended, this.superClass.name);
              this.superIR = Typeob.Object;
              this.superTypeExpression = null;
            }
          }
        }else{
          this.superTypeExpression.context.HandleError(JSError.TypeCannotBeExtended);
          this.superIR = Typeob.Object;
          this.superTypeExpression = null;
        }
      }