Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (28)
1343Debug.Assert(pArgumentType is AggregateType);
1350((AggregateType)pArgumentType).OwningAggregate.GetUnderlyingType(),
1360((AggregateType)pArgumentType).OwningAggregate.GetUnderlyingType(),
2061AggregateType typeDst = GetEnumBinOpType(ek, arg1.Type, arg2.Type, out AggregateType typeEnum);
2103NullableType typeDst = TypeManager.GetNullable(GetEnumBinOpType(ek, nonNullableType1, nonNullableType2, out AggregateType typeEnum));
2427private static AggregateType GetUserDefinedBinopArgumentType(CType type)
2434if (type is AggregateType ats && (ats.IsClassType || ats.IsStructType) && !ats.OwningAggregate.IsSkipUDOps())
2443private static int GetUserDefinedBinopArgumentTypes(CType type1, CType type2, AggregateType[] rgats)
2465private static bool UserDefinedBinaryOperatorCanBeLifted(ExpressionKind ek, MethodSymbol method, AggregateType ats,
2511ExpressionKind ek, MethodSymbol method, AggregateType ats, Expr arg1, Expr arg2, bool fDontLift)
2550List<CandidateFunctionMember> candidateList, ExpressionKind ek, AggregateType type,
2570private AggregateType GetApplicableUserDefinedBinaryOperatorCandidatesInBaseTypes(
2571List<CandidateFunctionMember> candidateList, ExpressionKind ek, AggregateType type,
2572Expr arg1, Expr arg2, bool fDontLift, AggregateType atsStop)
2574for (AggregateType atsCur = type; atsCur != null && atsCur != atsStop; atsCur = atsCur.BaseClass)
2593AggregateType[] rgats = { null, null };
2607AggregateType atsStop = GetApplicableUserDefinedBinaryOperatorCandidatesInBaseTypes(methFirst, ek,
2746private static AggregateType GetEnumBinOpType(ExpressionKind ek, CType argType1, CType argType2, out AggregateType ppEnumType)
2750AggregateType type1 = argType1 as AggregateType;
2751AggregateType type2 = argType2 as AggregateType;
2753AggregateType typeEnum = type1.IsEnumType ? type1 : type2;
2758AggregateType typeDst = typeEnum;
2797AggregateType callingType = TypeManager.GetAggregate(agg, TypeArray.Empty);
2813AggregateType pCallingType = TypeManager.GetAggregate(pAgg, TypeArray.Empty);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (29)
91public static AggregateType GetAggregate(AggregateSymbol agg, AggregateType atsOuter, TypeArray typeArgs)
98AggregateType pAggregate = TypeTable.LookupAggregate(agg, atsOuter, typeArgs);
116public static AggregateType GetAggregate(AggregateSymbol agg, TypeArray typeArgsAll)
133AggregateType atsOuter = GetAggregate(aggOuter, typeArgsOuter);
197public static AggregateType SubstType(AggregateType typeSrc, TypeArray typeArgsCls)
247private static AggregateType SubstTypeCore(AggregateType type, SubstContext ctx)
299return SubstTypeCore((AggregateType)type, pctx);
420if (!(typeDst is AggregateType atsDst))
423AggregateType atsSrc = (AggregateType)typeSrc;
501AggregateType ats = (AggregateType)type;
539AggregateType ats = (AggregateType)type;
566public static AggregateType SubstType(AggregateType typeSrc, SubstContext ctx) =>
574public static CType SubstType(CType typeSrc, AggregateType atsCls) => SubstType(typeSrc, atsCls, null);
577public static CType SubstType(CType typeSrc, AggregateType atsCls, TypeArray typeArgsMeth) =>
582SubstType(typeSrc, (typeCls as AggregateType)?.TypeArgsAll, typeArgsMeth);
585public static TypeArray SubstTypeArray(TypeArray taSrc, AggregateType atsCls, TypeArray typeArgsMeth) =>
589public static TypeArray SubstTypeArray(TypeArray taSrc, AggregateType atsCls) => SubstTypeArray(taSrc, atsCls, null);
593SubstEqualTypes(typeDst, typeSrc, (typeCls as AggregateType)?.TypeArgsAll, typeArgsMeth, false);
634if (typeSrc is AggregateType aggSrc)
648AggregateType baseType = aggSrc.BaseClass;
691private static bool TryVarianceAdjustmentToGetAccessibleType(AggregateSymbol context, AggregateType typeSrc, out CType typeDst)
699AggregateType aggOpenType = aggSym.getThisType();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeTable.cs (9)
51private static readonly Dictionary<KeyPair<AggregateSymbol, KeyPair<AggregateType, TypeArray>>, AggregateType> s_aggregateTable =
52new Dictionary<KeyPair<AggregateSymbol, KeyPair<AggregateType, TypeArray>>, AggregateType>();
67public static AggregateType LookupAggregate(AggregateSymbol aggregate, AggregateType outer, TypeArray args)
70s_aggregateTable.TryGetValue(MakeKey(aggregate, MakeKey(outer, args)), out AggregateType result);
74public static void InsertAggregate(AggregateSymbol aggregate, AggregateType outer, TypeArray args, AggregateType ats)
Microsoft\CSharp\RuntimeBinder\Semantics\WithType.cs (14)
25private AggregateType _ats;
32public SymWithType(Symbol sym, AggregateType ats)
43public AggregateType Ats
53public new AggregateType GetType()
127public void Set(Symbol sym, AggregateType ats)
143public MethPropWithType(MethodOrPropertySymbol mps, AggregateType ats)
155public MethWithType(MethodSymbol meth, AggregateType ats)
163public PropWithType(PropertySymbol prop, AggregateType ats)
176public FieldWithType(FieldSymbol field, AggregateType ats)
202public MethPropWithInst(MethodOrPropertySymbol mps, AggregateType ats)
207public MethPropWithInst(MethodOrPropertySymbol mps, AggregateType ats, TypeArray typeArgs)
218public void Set(MethodOrPropertySymbol mps, AggregateType ats, TypeArray typeArgs)
233public MethWithInst(MethodSymbol meth, AggregateType ats)
237public MethWithInst(MethodSymbol meth, AggregateType ats, TypeArray typeArgs)