public override Type VisitMapTypeProxy(MapTypeProxy node) { //Contract.Requires(node != null); Contract.Ensures(Contract.Result <Type>() != null); if (node.ProxyFor != null) { return(base.VisitMapTypeProxy(node)); } List <TypeVariable> /*!*/ typeParams = new List <TypeVariable>(); List <Type> /*!*/ arguments = new List <Type>(); for (int i = 0; i < node.Arity; ++i) { TypeVariable /*!*/ param = new TypeVariable(Token.NoToken, "arg" + i); Contract.Assert(param != null); typeParams.Add(param); arguments.Add(param); } TypeVariable /*!*/ result = new TypeVariable(Token.NoToken, "res"); Contract.Assert(result != null); typeParams.Add(result); Type /*!*/ instantiation = new MapType(Token.NoToken, typeParams, arguments, result); Contract.Assert(instantiation != null); return(Instantiate(node, instantiation)); }
public virtual Type VisitMapTypeProxy(MapTypeProxy node) { Contract.Requires(node != null); Contract.Ensures(Contract.Result <Type>() != null); // if the type proxy is instantiated with some more // specific type, we visit the instantiation if (node.ProxyFor != null) { return((Type)this.Visit(node.ProxyFor)); } return(this.VisitType(node)); }
public override Type VisitMapTypeProxy(MapTypeProxy node) { Contract.Ensures(Contract.Result<Type>() == node); // if the type proxy is instantiated with some more // specific type, we visit the instantiation if (node.ProxyFor != null) this.Visit(node.ProxyFor); return this.VisitType(node); }
public virtual Type VisitMapTypeProxy(MapTypeProxy node) { Contract.Requires(node != null); Contract.Ensures(Contract.Result<Type>() != null); // if the type proxy is instantiated with some more // specific type, we visit the instantiation if (node.ProxyFor != null) return (Type)this.Visit(node.ProxyFor); return this.VisitType(node); }
public override Type VisitMapTypeProxy(MapTypeProxy node) { //Contract.Requires(node != null); Contract.Ensures(Contract.Result<Type>() != null); if (node.ProxyFor != null) return base.VisitMapTypeProxy(node); List<TypeVariable>/*!*/ typeParams = new List<TypeVariable>(); List<Type>/*!*/ arguments = new List<Type>(); for (int i = 0; i < node.Arity; ++i) { TypeVariable/*!*/ param = new TypeVariable(Token.NoToken, "arg" + i); Contract.Assert(param != null); typeParams.Add(param); arguments.Add(param); } TypeVariable/*!*/ result = new TypeVariable(Token.NoToken, "res"); Contract.Assert(result != null); typeParams.Add(result); Type/*!*/ instantiation = new MapType(Token.NoToken, typeParams, arguments, result); Contract.Assert(instantiation != null); return Instantiate(node, instantiation); }
public override Type VisitMapTypeProxy(MapTypeProxy node) { problematicNode = node; return(node); }