protected override TypeExpr DoResolveAsTypeStep (IMemberContext ec) { var type = ec.Module.PredefinedTypes.Nullable.Resolve (loc); if (type == null) return null; TypeArguments args = new TypeArguments (underlying); GenericTypeExpr ctype = new GenericTypeExpr (type, args, loc); return ctype.ResolveAsTypeTerminal (ec, false); }
protected override TypeExpr DoResolveAsTypeStep (IMemberContext ec) { if (TypeManager.generic_nullable_type == null) { TypeManager.generic_nullable_type = TypeManager.CoreLookupType (ec.Compiler, "System", "Nullable", 1, MemberKind.Struct, true); } TypeArguments args = new TypeArguments (underlying); GenericTypeExpr ctype = new GenericTypeExpr (TypeManager.generic_nullable_type, args, loc); return ctype.ResolveAsTypeTerminal (ec, false); }
protected override TypeExpr DoResolveAsTypeStep(IMemberContext ec) { if (TypeManager.generic_nullable_type == null) { TypeManager.generic_nullable_type = TypeManager.CoreLookupType(ec.Compiler, "System", "Nullable`1", Kind.Struct, true); } TypeArguments args = new TypeArguments(underlying); GenericTypeExpr ctype = new GenericTypeExpr(TypeManager.generic_nullable_type, args, loc); return(ctype.ResolveAsTypeTerminal(ec, false)); }
protected override TypeExpr DoResolveAsTypeStep(IMemberContext ec) { var type = ec.Module.PredefinedTypes.Nullable.Resolve(loc); if (type == null) { return(null); } TypeArguments args = new TypeArguments(underlying); GenericTypeExpr ctype = new GenericTypeExpr(type, args, loc); return(ctype.ResolveAsTypeTerminal(ec, false)); }