42 references to Compilation
Microsoft.CodeAnalysis.CSharp (42)
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (1)
312BinaryOperatorSignature signature = this.Compilation.BuiltInOperators.GetSignature(easyOut);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (23)
312operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Delegate, delegateType, delegateType, Compilation.GetSpecialType(SpecialType.System_Boolean))); 478var nullableEnum = Compilation.GetOrCreateNullableType(enumType); 479var nullableUnderlying = Compilation.GetOrCreateNullableType(underlying); 527var boolean = Compilation.GetSpecialType(SpecialType.System_Boolean); 551operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndIntAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType)); 552operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndUIntAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType)); 553operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndLongAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType)); 554operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndULongAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType)); 555operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.IntAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType, pointerType)); 556operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.UIntAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType, pointerType)); 557operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.LongAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType, pointerType)); 558operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.ULongAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType, pointerType)); 561operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndIntSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType)); 562operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndUIntSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType)); 563operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndLongSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType)); 564operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndULongSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType)); 565operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerSubtraction, pointerType, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64))); 582var voidPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(Compilation.GetSpecialType(SpecialType.System_Void))); 583operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Pointer, voidPointerType, voidPointerType, Compilation.GetSpecialType(SpecialType.System_Boolean))); 741this.Compilation.BuiltInOperators.GetSimpleBuiltInOperators(kind, operators, skipNativeIntegerOperators: !left.Type.IsNativeIntegerOrNullableThereof() && !right.Type.IsNativeIntegerOrNullableThereof()); 756this.Compilation.BuiltInOperators.GetUtf8ConcatenationBuiltInOperator(left.Type, operators); 785var @object = Compilation.GetSpecialType(SpecialType.System_Object); 786operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Object, @object, @object, Compilation.GetSpecialType(SpecialType.System_Boolean)));
Binder\Semantics\Operators\UnaryOperatorEasyOut.cs (1)
112UnaryOperatorSignature signature = this.Compilation.BuiltInOperators.GetSignature(easyOut);
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (3)
20return Compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(type); 257this.Compilation.BuiltInOperators.GetSimpleBuiltInOperators(kind, operators, skipNativeIntegerOperators: !operand.Type.IsNativeIntegerOrNullableThereof()); 308var nullableEnum = Compilation.GetOrCreateNullableType(enumType);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (14)
447if (Compilation.LanguageVersion.AllowImprovedOverloadCandidates()) 806new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: false, location: NoLocation.Singleton, diagnostics: null, template), 1838if (!Compilation.IsFeatureEnabled(MessageID.IDS_FeatureOverloadResolutionPriority)) 2193type1Normalized = type1.NormalizeTaskTypes(Compilation); 2194type2Normalized = type2.NormalizeTaskTypes(Compilation); 2317type1Normalized = type1.NormalizeTaskTypes(Compilation); 2318type2Normalized = type2.NormalizeTaskTypes(Compilation); 3017if (Compilation.LanguageVersion < LanguageVersion.CSharp13) 3188CollectionExpressionTypeKind kind1 = ConversionsBase.GetCollectionExpressionTypeKind(Compilation, t1, out TypeWithAnnotations elementType1); 3189CollectionExpressionTypeKind kind2 = ConversionsBase.GetCollectionExpressionTypeKind(Compilation, t2, out TypeWithAnnotations elementType2); 3269if (y.OriginalDefinition.IsGenericTaskType(Compilation)) 3482bool type1IsGenericTask = type1.OriginalDefinition.IsGenericTaskType(Compilation); 3483bool type2IsGenericTask = type2.OriginalDefinition.IsGenericTaskType(Compilation); 4265if (!parameterTypes[i].Type.CheckAllConstraints(Compilation, Conversions))