BoundTypeRef BindTypeRef(AST.TypeRef tref) { var bound = new BoundTypeRef(tref); if (tref is AST.IndirectTypeRef) { bound.TypeExpression = BindExpression(((AST.IndirectTypeRef)tref).ClassNameVar); } return(bound); }
/// <summary> /// Gets type mask corresponding to given TypeRef within this context. /// </summary> public TypeRefMask GetTypeMask(AST.TypeRef /*!*/ tref, bool includesSubclasses = true) { Contract.ThrowIfNull(tref); var dtype = tref as AST.DirectTypeRef; if (dtype != null) { return(GetTypeMask(dtype.ClassName, includesSubclasses)); } else { var itype = tref as AST.IndirectTypeRef; if (itype != null) { return(GetTypeMask(itype, includesSubclasses)); } } // return(TypeRefMask.AnyType); }