3 writes to Compilation
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder.cs (3)
35
this.
Compilation
= compilation;
43
this.
Compilation
= next.Compilation;
56
this.
Compilation
= next.Compilation;
401 references to Compilation
Microsoft.CodeAnalysis.CSharp (401)
Binder\Binder.cs (8)
43
this.Compilation = next.
Compilation
;
56
this.Compilation = next.
Compilation
;
138
return result == OverflowChecks.Enabled || result == OverflowChecks.Implicit &&
Compilation
.Options.CheckOverflow;
160
internal bool UseUpdatedEscapeRules =>
Compilation
.SourceModule.UseUpdatedEscapeRules;
265
!csTree.IsGeneratedCode(this.
Compilation
.Options.SyntaxTreeOptionsProvider, CancellationToken.None),
284
switch (
Compilation
.Options.NullableContextOptions)
295
throw ExceptionUtilities.UnexpectedValue(
Compilation
.Options.NullableContextOptions);
856
return new CompoundUseSiteInfo<AssemblySymbol>(futureDestination,
Compilation
.Assembly);
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
183
enclosingBinder.
Compilation
,
Binder\Binder.ValueChecks.cs (5)
1154
var getItemOrSliceHelper = (MethodSymbol)
Compilation
.GetWellKnownTypeMember(elementAccess.GetItemOrSliceHelper);
1234
Compilation
.GetWellKnownType(WellKnownType.System_Range),
1308
else if (this.IsDirectlyInIterator &&
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureRefUnsafeInIteratorAsync))
1723
(
Compilation
.FeatureStrictEnabled
2053
if (setMethod.DeclaringCompilation != this.
Compilation
)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
90
new ExtendedErrorTypeSymbol(this.
Compilation
, "", 0, info));
Binder\Binder_AnonymousTypes.cs (1)
105
AnonymousTypeManager manager = this.
Compilation
.AnonymousTypeManager;
Binder\Binder_Attributes.cs (9)
298
return new SourceAttributeData(
Compilation
, (AttributeSyntax)boundAttribute.Syntax, attributeType, attributeConstructor, hasErrors);
336
Compilation
,
405
if (!paramType.Type.IsValidAttributeParameterType(
Compilation
))
543
if (setMethod.IsInitOnly && setMethod.DeclaringCompilation != this.
Compilation
)
677
if (!namedArgumentType.IsValidAttributeParameterType(
Compilation
))
848
var typedConstantKind = node.Type.GetAttributeParameterTypedConstantKind(_binder.
Compilation
);
885
var typedConstantKind = type.GetAttributeParameterTypedConstantKind(_binder.
Compilation
);
935
var typedConstantKind = operandType.GetAttributeParameterTypedConstantKind(_binder.
Compilation
);
990
var typedConstantKind = type.GetAttributeParameterTypedConstantKind(_binder.
Compilation
);
Binder\Binder_Await.cs (7)
41
TypeSymbol awaitExpressionType = (info.GetResult ?? info.RuntimeAsyncAwaitCall?.Method)?.ReturnType ?? (hasErrors ? CreateErrorType() :
Compilation
.DynamicType);
192
else if (method.IsIterator && InMethodBinder.IsAsyncStreamInterface(
Compilation
, method.RefKind, method.ReturnType))
303
var isRuntimeAsyncEnabled =
Compilation
.IsRuntimeAsyncEnabledIn(this.ContainingMemberOrLambda);
451
new ConstraintsHelper.CheckConstraintsArgs(@this.
Compilation
, @this.Conversions, includeNullability: false, node.Location, tempDiagnostics)))
492
var useUnsafeAwait =
Compilation
.Conversions.ClassifyImplicitConversionFromType(
494
Compilation
.GetSpecialType(InternalSpecialType.System_Runtime_CompilerServices_ICriticalNotifyCompletion),
516
new ConstraintsHelper.CheckConstraintsArgs(this.
Compilation
, this.Conversions, includeNullability: false, syntax.Location, diagnostics));
Binder\Binder_Constraints.cs (1)
322
if (!
Compilation
.Assembly.RuntimeSupportsByRefLikeGenerics)
Binder\Binder_Conversions.cs (27)
439
if (
Compilation
.SourceModule != method.ContainingModule)
443
if (!
Compilation
.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces)
451
Compilation
.SourceModule != method.ContainingModule)
459
if (!
Compilation
.Assembly.RuntimeSupportsInlineArrayTypes)
474
if (destination.OriginalDefinition.Equals(
Compilation
.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions))
489
Debug.Assert(destination.OriginalDefinition.Equals(
Compilation
.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.AllIgnoreOptions));
560
.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(
Compilation
, Conversions, includeNullability: false, syntax.Location, diagnostics));
568
TryFindAsSpanCharMethod(
Compilation
, destination),
730
Debug.Assert(destination.Equals(
Compilation
.GetWellKnownType(WellKnownType.System_IFormattable), TypeCompareKind.ConsiderEverything) ||
731
destination.Equals(
Compilation
.GetWellKnownType(WellKnownType.System_FormattableString), TypeCompareKind.ConsiderEverything));
920
if (LocalRewriter.IsAllocatingRefStructCollectionExpression(_node, collectionTypeKind, elementType, _binder.
Compilation
))
973
if (_targetType.OriginalDefinition.Equals(_binder.
Compilation
.GetWellKnownType(WellKnownType.System_Collections_Immutable_ImmutableArray_T), TypeCompareKind.ConsiderEverything))
1234
var list_T__ctor = (MethodSymbol?)@this._binder.
Compilation
.GetWellKnownTypeMember(WellKnownMember.System_Collections_Generic_List_T__ctor);
1235
var list_T__ctorInt32 = (MethodSymbol?)@this._binder.
Compilation
.GetWellKnownTypeMember(WellKnownMember.System_Collections_Generic_List_T__ctorInt32);
1469
var readOnlySpanType =
Compilation
.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T);
1565
Debug.Assert(parameterType.OriginalDefinition.Equals(
Compilation
.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions));
1570
Compilation
, Conversions, includeNullability: false, syntax.Location, diagnostics));
1778
var elementPlaceholder = new BoundValuePlaceholder(syntax,
Compilation
.DynamicType) { WasCompilerGenerated = true };
2026
member, receiverType, addMethodBinder.
Compilation
, ref useSiteInfo, out wasFullyInferred);
2286
var collectionTypeKind = ConversionsBase.GetCollectionExpressionTypeKind(
Compilation
, targetType, out TypeWithAnnotations elementTypeWithAnnotations);
2346
GenerateImplicitConversionError(diagnostics, this.
Compilation
, spreadElement.Expression.Syntax, elementConversion, enumeratorInfo.ElementType, elementType);
2400
if (targetTyped && !destination.IsErrorType() && !
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureTargetTypedConditional))
2405
Compilation
.LanguageVersion.ToDisplayString(),
2650
delegateType =
Compilation
.GetWellKnownType(WellKnownType.System_Linq_Expressions_Expression_T).Construct(delegateType);
2915
stackAllocType =
Compilation
.GetWellKnownType(WellKnownType.System_Span_T).Construct(elementType);
3141
return !methodSymbol.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.
Compilation
, this.Conversions, includeNullability: false, node.Location, diagnostics));
3227
else if (WasImplicitReceiver(receiverOpt) && !(IsInsideNameof &&
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureInstanceMemberInNameof)))
Binder\Binder_Crefs.cs (2)
1167
Debug.Assert(!this.
Compilation
.ContainsSyntaxTree(typeSyntax.SyntaxTree) ||
1168
this.
Compilation
.GetBinderFactory(typeSyntax.SyntaxTree).GetBinder(typeSyntax).Flags ==
Binder\Binder_Deconstruct.cs (6)
46
.CheckFeatureAvailability(diagnostics,
Compilation
, node.Location);
55
.CheckFeatureAvailability(diagnostics,
Compilation
, node.Location);
331
GenerateImplicitConversionError(diagnostics,
Compilation
, single.Syntax, nestedConversion, tupleOrDeconstructedTypes[i], single.Type);
539
compilation:
Compilation
,
582
bool disallowInferredNames = this.
Compilation
.LanguageVersion.DisallowInferredTupleElementNames();
587
tupleNames, this.
Compilation
,
Binder\Binder_Expressions.cs (67)
38
if (!isExplicit && IsInsideNameof &&
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureInstanceMemberInNameof))
251
return new ExtendedErrorTypeSymbol(this.
Compilation
, name, arity: 0, errorInfo: null, unreported: false);
355
SymbolDistinguisher distinguisher = new SymbolDistinguisher(this.
Compilation
, trueSymbol, falseSymbol);
1013
bool disallowInferredNames = this.
Compilation
.LanguageVersion.DisallowInferredTupleElementNames();
1022
Compilation
,
1101
bool disallowInferredNames = this.
Compilation
.LanguageVersion.DisallowInferredTupleElementNames();
1104
this.
Compilation
, syntax: node, diagnostics: diagnostics, shouldCheckConstraints: true,
1109
NamedTypeSymbol.VerifyTupleTypePresent(elements.Length, node, this.
Compilation
, diagnostics);
1259
TypeSymbol typedReferenceType = this.
Compilation
.GetSpecialType(SpecialType.System_TypedReference);
1307
TypeSymbol typedReferenceType = this.
Compilation
.GetSpecialType(SpecialType.System_TypedReference);
1468
bool typeHasErrors = type.IsErrorType() || CheckManagedAddr(
Compilation
, type, node.Location, diagnostics);
1484
diagnostics.Add(ErrorCode.WRN_FieldIsAmbiguous, node,
Compilation
.LanguageVersion.ToDisplayString());
1570
if (
Compilation
.LanguageVersion >= requiredVersion)
2238
this.
Compilation
, name: "var", arity: 0, errorInfo: null, variableUsedBeforeDeclaration: true);
2301
this.
Compilation
, name: "var", arity: 0, errorInfo: null, variableUsedBeforeDeclaration: true);
2307
isNullableUnknown = (type == (object)
Compilation
.ImplicitlyTypedVariableUsedInForbiddenZoneType);
2454
TypeSymbol hostObjectType =
Compilation
.GetHostObjectTypeSymbol();
2888
SymbolDistinguisher distinguisher1 = new SymbolDistinguisher(this.
Compilation
, operand.Type, targetType);
2963
SymbolDistinguisher distinguisher = new SymbolDistinguisher(this.
Compilation
, operand.Type, targetType);
3137
if (
Compilation
.FeatureStrictEnabled || !isDelegateCreation)
3457
if (!hadLangVersionError && !
Compilation
.LanguageVersion.AllowNonTrailingNamedArguments())
3985
if (!
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters))
4227
var arrayType = ArrayTypeSymbol.CreateCSharpArray(
Compilation
.Assembly, TypeWithAnnotations.Create(bestType), rank);
4249
CheckManagedAddr(
Compilation
, bestType, node.Location, diagnostics, errorForManaged: true);
4461
this.
Compilation
.CreateArrayTypeSymbol(GetSpecialType(SpecialType.System_Object, diagnostics, node)),
4607
hasErrors = hasErrors || CheckManagedAddr(
Compilation
, elementType.Type, elementTypeSyntax.Location, diagnostics, errorForManaged: true);
4669
if (requiredVersion >
Compilation
.LanguageVersion)
5469
type: @this.
Compilation
.GetSpecialType(SpecialType.System_Object));
6484
initializerType.ContainingModule !=
Compilation
.SourceModule)
6830
Debug.Assert((object)this.
Compilation
.Assembly != null);
6831
return IsSymbolAccessibleConditional(constructor, this.
Compilation
.Assembly, ref useSiteInfo);
7180
SymbolDistinguisher distinguisher = new SymbolDistinguisher(this.
Compilation
, coClassType, interfaceType);
7868
type:
Compilation
.DynamicType,
8185
Compilation
.LanguageVersion < MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion())
8464
else if (boundLeft.Kind == BoundKind.AwaitableValuePlaceholder && boundLeft.Type.IsIAsyncEnumerableType(
Compilation
))
8501
TypeSymbol.Equals(namedType,
Compilation
.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncAction), TypeCompareKind.ConsiderEverything2) ||
8502
TypeSymbol.Equals(namedType,
Compilation
.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncActionWithProgress_T), TypeCompareKind.ConsiderEverything2) ||
8503
TypeSymbol.Equals(namedType,
Compilation
.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperation_T), TypeCompareKind.ConsiderEverything2) ||
8504
TypeSymbol.Equals(namedType,
Compilation
.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperationWithProgress_T2), TypeCompareKind.ConsiderEverything2);
8981
&& method.ReduceExtensionMethod(receiverType, binder.
Compilation
) is null)
8986
&& SourceNamedTypeSymbol.ReduceExtensionMember(binder.
Compilation
, method, receiverType, wasExtensionFullyInferred: out _) is null)
9099
errorInfo = OverloadResolutionResult<Symbol>.CreateAmbiguousCallDiagnosticInfo(binder.
Compilation
, representativeMethod, representativeProperty, symbols, isExtension: true);
9219
if ((object)
Compilation
.SourceModule != fieldSymbol.OriginalDefinition.ContainingModule &&
9223
if (!
Compilation
.Assembly.RuntimeSupportsByRefFields)
9350
if (!
Compilation
.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces &&
Compilation
.SourceModule != symbol.ContainingModule)
9362
else if (!
Compilation
.Assembly.RuntimeSupportsDefaultInterfaceImplementation &&
Compilation
.SourceModule != symbol.ContainingModule)
9834
if (!
Compilation
.Assembly.RuntimeSupportsInlineArrayTypes)
9848
resultType =
Compilation
.GetWellKnownType(
9871
int? constIndex = InferConstantIndexFromSystemIndex(
Compilation
, convertedIndex, length, out location);
10560
TypeSymbol.Equals(argType,
Compilation
.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything) ? ThreeState.True :
10561
TypeSymbol.Equals(argType,
Compilation
.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything) ? ThreeState.False :
10693
var intPlaceholder = new BoundImplicitIndexerValuePlaceholder(syntax,
Compilation
.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true };
10764
var startArgumentPlaceholder = new BoundImplicitIndexerValuePlaceholder(syntax,
Compilation
.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true };
10765
var lengthArgumentPlaceholder = new BoundImplicitIndexerValuePlaceholder(syntax,
Compilation
.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true };
11195
var substituted = (MethodSymbol?)extensionMember.GetReducedAndFilteredSymbol(typeArguments, receiver.Type,
Compilation
, checkFullyInferred: true);
11201
else if (m.ReduceExtensionMethod(receiver.Type,
Compilation
) is { } reduced)
11306
if (
Compilation
.LanguageVersion < LanguageVersion.CSharp13)
11406
var substituted = (MethodSymbol?)extensionMember.GetReducedAndFilteredSymbol(typeArguments, receiver.Type,
Compilation
, checkFullyInferred: true);
11474
new ConstraintsHelper.CheckConstraintsArgs(this.
Compilation
, this.Conversions, includeNullability: false, location: NoLocation.Singleton, diagnostics: null),
11546
var delegateType =
Compilation
.GetWellKnownType(wkDelegateType);
11551
if (checkConstraints(
Compilation
, Conversions, delegateType, typeArguments))
11577
return
Compilation
.AnonymousTypeManager.ConstructAnonymousDelegateSymbol(typeDescr);
11719
resultIsUsed = (((SimpleLambdaExpressionSyntax)parent).Body != node) || MethodOrLambdaRequiresValue(ContainingMemberOrLambda,
Compilation
);
11723
resultIsUsed = (((ParenthesizedLambdaExpressionSyntax)parent).Body != node) || MethodOrLambdaRequiresValue(ContainingMemberOrLambda,
Compilation
);
11727
resultIsUsed = (((ArrowExpressionClauseSyntax)parent).Expression != node) || MethodOrLambdaRequiresValue(ContainingMemberOrLambda,
Compilation
);
Binder\Binder_Flags.cs (1)
100
var withoutUnsafe = isIteratorBody && this.
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureRefUnsafeInIteratorAsync);
Binder\Binder_Initializers.cs (1)
254
if (binder.
Compilation
.IsSubmission)
Binder\Binder_InterpolatedString.cs (9)
32
if (startText.StartsWith("@$\"") && !
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureAltInterpolatedVerbatimStrings))
53
var newLinesInInterpolationsAllowed = this.
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureNewLinesInInterpolations);
85
this.
Compilation
.LanguageVersion.ToDisplayString(),
284
var interpolatedStringHandlerType =
Compilation
.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_DefaultInterpolatedStringHandler);
400
value = GenerateConversionForAssignment(
Compilation
.ObjectType, value, diagnostics);
450
var interpolatedStringHandlerType =
Compilation
.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_DefaultInterpolatedStringHandler);
664
else if (!
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureImprovedInterpolatedStrings) && diagnostics.AccumulatesDiagnostics)
998
var expected = builderPatternExpectsBool == true ?
Compilation
.GetSpecialType(SpecialType.System_Boolean) :
Compilation
.GetSpecialType(SpecialType.System_Void);
Binder\Binder_Invocation.cs (19)
269
if (IsInAsyncMethod() &&
Compilation
.IsRuntimeAsyncEnabledIn(ContainingMemberOrLambda))
393
CheckRestrictedTypeReceiver(result, this.
Compilation
, diagnostics);
500
type:
Compilation
.DynamicType,
512
if (!
Compilation
.LanguageVersion.AllowNonTrailingNamedArguments())
1038
(typeArgumentsOpt.IsDefault || ((MethodSymbol)(object)result.Member).CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.
Compilation
, this.Conversions, includeNullability: false, syntax.Location, candidateDiagnostics))))
1458
if (GetWellKnownTypeMember(
Compilation
, WellKnownMember.System_Runtime_InteropServices_UnknownWrapper__ctor, diagnostics, syntax: syntax) is MethodSymbol methodSymbol)
1467
if (GetWellKnownTypeMember(
Compilation
, WellKnownMember.System_Runtime_InteropServices_DispatchWrapper__ctor, diagnostics, syntax: syntax) is MethodSymbol methodSymbol)
1476
if (GetWellKnownTypeMember(
Compilation
, WellKnownMember.System_Type__Missing, diagnostics, syntax: syntax) is FieldSymbol fieldSymbol)
1696
defaultValue = new BoundLiteral(syntax, ConstantValue.Create(line),
Compilation
.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true };
1700
string path = callerSourceLocation.SourceTree.GetDisplayPath(callerSourceLocation.SourceSpan,
Compilation
.Options.SourceReferenceResolver);
1701
defaultValue = new BoundLiteral(syntax, ConstantValue.Create(path),
Compilation
.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true };
1706
defaultValue = new BoundLiteral(syntax, ConstantValue.Create(memberName),
Compilation
.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true };
1711
&& Conversions.ClassifyBuiltInConversion(
Compilation
.GetSpecialType(SpecialType.System_String), parameterType, isChecked: false, ref discardedUseSiteInfo).Exists
1714
defaultValue = new BoundLiteral(syntax, ConstantValue.Create(argument.Syntax.ToString()),
Compilation
.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true };
1736
TypeSymbol constantType =
Compilation
.GetSpecialType(defaultConstantValue.SpecialType);
1855
if (
Compilation
.SourceModule != paramsParameter.ContainingModule)
2084
var returnType = GetCommonTypeOrReturnType(methods) ?? new ExtendedErrorTypeSymbol(this.
Compilation
, string.Empty, arity: 0, errorInfo: null);
2327
TypeSymbol returnType = new ExtendedErrorTypeSymbol(this.
Compilation
, string.Empty, arity: 0, errorInfo: null);
2434
return new BoundNameOfOperator(node, boundArgument, ConstantValue.Create(name),
Compilation
.GetSpecialType(SpecialType.System_String));
Binder\Binder_Lambda.cs (4)
196
ReportUseSiteDiagnosticForSynthesizedAttribute(
Compilation
,
318
refCustomModifiers = [CSharpCustomModifier.CreateRequired(Binder.GetWellKnownType(
Compilation
, WellKnownType.System_Runtime_InteropServices_InAttribute, diagnostics, syntax.Location))];
381
bool allowShadowingNames = binder.
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureNameShadowingInNestedFunctions);
401
binder.
Compilation
,
Binder\Binder_Lookup.cs (28)
307
bool isSubmissionTree =
Compilation
.IsSubmissionSyntaxTree(declarationSyntax.SyntaxTree);
310
for (CSharpCompilation submission =
Compilation
; submission != null; submission = submission.PreviousSubmission)
314
var isCurrentSubmission = submission ==
Compilation
;
328
submissionImports = ((SourceNamespaceSymbol)
Compilation
.SourceModule.GlobalNamespace).GetImports(declarationSyntax, basesBeingResolved);
362
submissionImports = Imports.ExpandPreviousSubmissionImports(submissionImports,
Compilation
);
438
Compilation
.MarkImportDirectiveAsUsed(directive);
738
if (
Compilation
.IsEqualOrDerivedFromWellKnownClass(namedType, WellKnownType.System_Attribute, ref useSiteInfo))
886
var error = new ExtendedErrorTypeSymbol(this.
Compilation
, name, arity, diagInfo, unreported: true);
898
currentType = currentType.GetNextBaseTypeNoUseSiteDiagnostics(basesBeingResolved, this.
Compilation
, ref visited);
1005
idictSymbol =
Compilation
.GetWellKnownType(WellKnownType.System_Collections_Generic_IDictionary_KV);
1006
iroDictSymbol =
Compilation
.GetWellKnownType(WellKnownType.System_Collections_Generic_IReadOnlyDictionary_KV);
1007
iListSymbol =
Compilation
.GetWellKnownType(WellKnownType.System_Collections_IList);
1008
iCollectionSymbol =
Compilation
.GetWellKnownType(WellKnownType.System_Collections_ICollection);
1009
inccSymbol =
Compilation
.GetWellKnownType(WellKnownType.System_Collections_Specialized_INotifyCollectionChanged);
1010
inpcSymbol =
Compilation
.GetWellKnownType(WellKnownType.System_ComponentModel_INotifyPropertyChanged);
1207
this.LookupMembersInClass(tmp, this.
Compilation
.GetSpecialType(SpecialType.System_Object), name, arity, basesBeingResolved, options, originalBinder, type, diagnose, ref useSiteInfo);
1299
if (!IsDerivedType(baseType: hiddenContainer, derivedType: hidingSym.ContainingType, basesBeingResolved, this.
Compilation
, useSiteInfo: ref useSiteInfo) &&
1396
if ((object)symbol.DeclaringCompilation != this.
Compilation
1457
else if (!this.
Compilation
.SourceModule.Equals(unwrappedSymbol.ContainingModule) && unwrappedSymbol.IsHiddenByCodeAnalysisEmbeddedAttribute())
1512
diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_FriendRefNotEqualToThis, unwrappedSymbol.ContainingAssembly.Identity.ToString(), AssemblyIdentity.PublicKeyToString(this.
Compilation
.Assembly.PublicKey));
1560
var assemblyName = this.
Compilation
.AssemblyName;
1571
ImmutableArray<byte> publicKey = this.
Compilation
.Assembly.PublicKey;
1697
return !IsEffectivelyPrivate(symbol) || symbol.ContainingAssembly == this.
Compilation
.Assembly;
1941
for (CSharpCompilation submission =
Compilation
; submission != null; submission = submission.PreviousSubmission)
1948
bool isCurrentSubmission = submission ==
Compilation
;
1956
submissionImports = Imports.ExpandPreviousSubmissionImports(submissionImports,
Compilation
);
2062
type = type.GetNextBaseTypeNoUseSiteDiagnostics(null, this.
Compilation
, ref visited);
2079
this.AddMemberLookupSymbolsInfoInClass(result,
Compilation
.GetSpecialType(SpecialType.System_Object), options, originalBinder, accessThroughType);
Binder\Binder_NameConflicts.cs (1)
121
bool allowShadowing =
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureNameShadowingInNestedFunctions);
Binder\Binder_Operators.cs (16)
76
var finalDynamicConversion = this.
Compilation
.Conversions.ClassifyConversionFromExpression(placeholder, left.Type, isChecked: CheckOverflowAtRuntime, ref useSiteInfo);
89
Compilation
.DynamicType),
489
if (
Compilation
.SourceModule != method.ContainingModule)
724
if (!eventSymbol.OriginalDefinition.IsFromCompilation(this.
Compilation
))
852
type:
Compilation
.DynamicType,
1380
return type is NamedTypeSymbol namedType &&
Compilation
.IsReadOnlySpanType(namedType) &&
1603
var booleanType =
Compilation
.GetSpecialType(SpecialType.System_Boolean);
2224
operatorMethod.ContainingModule !=
Compilation
.SourceModule)
3572
if (
Compilation
.SourceModule != method.ContainingModule)
3981
if (
Compilation
.SourceModule != methodOpt.ContainingModule)
3985
if (!
Compilation
.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces)
4009
if (
Compilation
.SourceModule != methodOpt.ContainingModule)
4138
hasErrors = CheckManagedAddr(
Compilation
, operandType, managedKind, node.Location, diagnostics);
5429
bool hasErrors = ReportAsOperatorConversionDiagnostics(node, diagnostics, this.
Compilation
, operandType, targetType, conversion.Kind, operand.ConstantValueOpt);
6035
if (
Compilation
.Assembly.RuntimeSupportsNumericIntPtr)
6051
if (
Compilation
.Assembly.RuntimeSupportsNumericIntPtr)
Binder\Binder_Patterns.cs (19)
60
this.
Compilation
, pattern.Syntax, expression, innerPattern, whenTrueLabel: whenTrueLabel, whenFalseLabel: whenFalseLabel, diagnostics);
131
if (!wasReported && diagnostics.AccumulatesDiagnostics && DecisionDagBuilder.EnableRedundantPatternsCheck(this.
Compilation
))
133
DecisionDagBuilder.CheckRedundantPatternsForIsPattern(this.
Compilation
, pattern.Syntax, expression, pattern, diagnostics);
375
hasErrors |= !TryGetSpecialTypeMember(
Compilation
, SpecialMember.System_Array__Length, node, diagnostics, out PropertySymbol lengthProperty);
644
if (
Compilation
.LanguageVersion < requiredVersion && !patternExpressionConversion.IsImplicit)
666
if (MessageID.IDS_FeatureSpanCharConstantPattern.CheckFeatureAvailability(diagnostics,
Compilation
, node.Location))
786
if (requiredVersion >
Compilation
.LanguageVersion)
790
Compilation
.LanguageVersion.ToDisplayString(),
1126
var objectType =
Compilation
.GetSpecialType(SpecialType.System_Object);
1153
var objectType =
Compilation
.GetSpecialType(SpecialType.System_Object);
1258
if (
Compilation
.LanguageVersion < MessageID.IDS_FeatureRecursivePatterns.RequiredVersion())
1263
iTupleType =
Compilation
.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_ITuple);
1272
if (declType != (object)
Compilation
.GetSpecialType(SpecialType.System_Object) &&
1273
declType != (object)
Compilation
.DynamicType &&
1281
iTupleGetLength = (MethodSymbol?)
Compilation
.GetWellKnownTypeMember(WellKnownMember.System_Runtime_CompilerServices_ITuple__get_Length);
1282
iTupleGetItem = (MethodSymbol?)
Compilation
.GetWellKnownTypeMember(WellKnownMember.System_Runtime_CompilerServices_ITuple__get_Item);
1303
var result =
Compilation
.Conversions.ClassifyBuiltInConversion(type, possibleBaseInterface, isChecked: CheckOverflowAtRuntime, ref useSiteInfo).IsImplicit;
1340
|| (inputType.IsPointerType() &&
Compilation
.LanguageVersion < MessageID.IDS_FeatureRecursivePatterns.RequiredVersion()))
1373
var declType = TypeWithState.ForType(inputType).ToTypeWithAnnotations(
Compilation
);
Binder\Binder_Query.cs (1)
818
AnonymousTypeManager manager = this.
Compilation
.AnonymousTypeManager;
Binder\Binder_QueryErrors.cs (4)
89
var ienumerable_t =
Compilation
.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T);
90
var iqueryable_t =
Compilation
.GetWellKnownType(WellKnownType.System_Linq_IQueryable_T);
127
var ienumerable =
Compilation
.GetSpecialType(SpecialType.System_Collections_IEnumerable);
128
var iqueryable =
Compilation
.GetWellKnownType(WellKnownType.System_Linq_IQueryable);
Binder\Binder_Statements.cs (19)
174
if (!this.
Compilation
.Options.AllowUnsafe)
270
else if (InUnsafeRegion &&
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureRefUnsafeInIteratorAsync))
396
if (
Compilation
.LanguageVersion < MessageID.IDS_FeatureSwitchExpression.RequiredVersion())
413
if ((object)type == null || !type.IsErrorType() && !
Compilation
.IsExceptionType(type.EffectiveType(ref useSiteInfo), ref useSiteInfo))
641
return method.ReturnsVoid || method.IsIterator || method.IsAsyncEffectivelyReturningTask(this.
Compilation
);
1315
if (CheckManagedAddr(
Compilation
, elementType, initializerSyntax.Location, diagnostics))
1380
GenerateImplicitConversionError(diagnostics, this.
Compilation
, initializerSyntax, elementConversionClassification, pointerType, declType);
2062
var reason = Conversions.IsAnonymousFunctionCompatibleWithType(anonymousFunction, targetType, this.
Compilation
);
2191
this.
Compilation
))
2249
SymbolDistinguisher distinguisher = new SymbolDistinguisher(this.
Compilation
, lambdaParameterType, delegateParameterType);
2482
GenerateImplicitConversionError(diagnostics, this.
Compilation
, syntax, conversion, sourceType, targetType, operand.ConstantValueOpt);
2994
return symbol?.Kind == SymbolKind.Method && ((MethodSymbol)symbol).IsAsyncEffectivelyReturningTask(this.
Compilation
);
3000
return symbol?.Kind == SymbolKind.Method && ((MethodSymbol)symbol).IsAsyncEffectivelyReturningGenericTask(this.
Compilation
);
3009
return method.IsAsyncReturningIAsyncEnumerable(this.
Compilation
) ||
3010
method.IsAsyncReturningIAsyncEnumerator(this.
Compilation
);
3325
if (!
Compilation
.IsExceptionType(effectiveType, ref useSiteInfo))
3378
else if (TypeSymbol.Equals(previousType,
Compilation
.GetWellKnownType(WellKnownType.System_Exception), TypeCompareKind.ConsiderEverything2) &&
3379
Compilation
.SourceAssembly.RuntimeCompatibilityWrapNonExceptionThrows)
3851
initializerInvocation = BindImplicitConstructorInitializer((MethodSymbol)this.ContainingMember(), diagnostics,
Compilation
);
Binder\Binder_Symbols.cs (38)
362
return this.
Compilation
.Assembly.GlobalNamespace;
369
return this.
Compilation
.GlobalNamespaceAlias;
556
TypeWithAnnotations constructedType = typeArgument.SetIsAnnotated(
Compilation
);
562
diagnostics.Add(new LazyUseSiteDiagnosticsInfoForNullableType(
Compilation
.LanguageVersion, constructedType), syntax.GetLocation());
569
type.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.
Compilation
, this.Conversions, includeNullability: true, location, diagnostics));
571
else if (GetNullableUnconstrainedTypeParameterDiagnosticIfNecessary(
Compilation
.LanguageVersion, constructedType) is { } diagnosticInfo)
610
CheckManagedAddr(
Compilation
, elementType.Type, node.Location, diagnostics);
681
var array = ArrayTypeSymbol.CreateCSharpArray(this.
Compilation
.Assembly, type, rankSpecifier.Rank);
734
ReportMissingTupleElementNamesAttributesIfNeeded(
Compilation
, syntax.GetLocation(), diagnostics);
745
bool includeNullability =
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureNullableReferenceTypes);
752
this.
Compilation
,
846
return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(qualifierOpt ?? this.
Compilation
.Assembly.GlobalNamespace, string.Empty, arity: 0, errorInfo: null));
873
Compilation
.Assembly.GlobalNamespace, identifierValueText, 0,
901
bindingResult =
Compilation
.DynamicType;
943
if (
Compilation
.LanguageVersion < MessageID.IDS_FeatureDynamic.RequiredVersion())
1055
if (!
Compilation
.HasDynamicEmitAttributes(bag, node.Location))
1344
return new ExtendedErrorTypeSymbol(this.
Compilation
, name, arity, diagnosticInfo, unreported: false);
1381
var binder = !
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureUsingTypeAlias)
1595
&& extensionMethod.ReduceExtensionMethod(receiverType,
Compilation
) is { } reduced)
1603
if (SourceNamedTypeSymbol.ReduceExtensionMember(this.
Compilation
, symbol, receiverType, wasExtensionFullyInferred: out _) is { } compatibleSubstitutedMember)
1644
bool includeNullability =
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureNullableReferenceTypes);
1645
type.CheckConstraintsForNamedType(new ConstraintsHelper.CheckConstraintsArgs(this.
Compilation
, this.Conversions, includeNullability, typeSyntax.Location, diagnostics),
1715
return GetSpecialType(this.
Compilation
, typeId, node, diagnostics);
1740
return GetSpecialTypeMember(this.
Compilation
, member, diagnostics, syntax);
1843
return GetWellKnownType(this.
Compilation
, type, diagnostics, location);
1888
NamedTypeSymbol typeSymbol = this.
Compilation
.GetWellKnownType(type);
1896
return GetWellKnownTypeMember(
Compilation
, member, diagnostics, location, syntax, isOptional);
2007
if (container is object && container !=
Compilation
.Assembly && container !=
Compilation
.Assembly.CorLibrary)
2232
if (ns.ContainingAssembly ==
Compilation
.Assembly)
2244
Debug.Assert(arg2.ContainingAssembly ==
Compilation
.Assembly);
2287
Compilation
.IsAttributeType((NamedTypeSymbol)first) &&
2288
Compilation
.IsAttributeType((NamedTypeSymbol)second))
2346
((SourceModuleSymbol)this.
Compilation
.SourceModule).AnyReferencedAssembliesAreLinked)
2401
return new ExtendedErrorTypeSymbol(qualifierOpt ??
Compilation
.Assembly.GlobalNamespace, simpleName, arity, info);
2563
var compilation = this.
Compilation
;
2665
if (ReferenceEquals(qualifierOpt,
Compilation
.GlobalNamespace))
2721
Compilation
.Assembly.Modules[0].GetReferencedAssemblySymbols())
Binder\Binder_TupleOperators.cs (2)
198
TypeSymbol dynamicType = hasError ? CreateErrorType() :
Compilation
.DynamicType;
250
var compilation = this.
Compilation
;
Binder\Binder_Unsafe.cs (5)
115
if (this.
Compilation
.SourceModule.UseUpdatedMemorySafetyRules)
117
return MessageID.IDS_FeatureUnsafeEvolution.GetFeatureAvailabilityDiagnosticInfo(this.
Compilation
);
127
if (this.
Compilation
.SourceModule.UseUpdatedMemorySafetyRules)
129
return MessageID.IDS_FeatureUnsafeEvolution.GetFeatureAvailabilityDiagnosticInfo(this.
Compilation
)
138
else if (this.IsIndirectlyInIterator && MessageID.IDS_FeatureRefUnsafeInIteratorAsync.GetFeatureAvailabilityDiagnosticInfo(
Compilation
) is { } unsafeInIteratorDiagnosticInfo)
Binder\BinderFactory.BinderFactoryVisitor.cs (2)
912
container = outer.
Compilation
.GlobalNamespace;
920
outer = AddInImportsBinders((SourceNamespaceSymbol)outer.
Compilation
.SourceModule.GetModuleNamespace(ns), namespaceDecl, outer, inUsing);
Binder\BuckStopsHereBinder.cs (1)
70
return IsSymbolAccessibleConditional(symbol,
Compilation
.Assembly, ref useSiteInfo);
Binder\ForEachEnumeratorInfo.cs (1)
166
LocalRewriter.TryGetDisposeMethod(binder.
Compilation
, syntax, this.IsAsync, BindingDiagnosticBag.Discarded, out var disposeMethod))
Binder\ForEachLoopBinder.cs (18)
244
messageId.CheckFeatureAvailability(diagnostics,
Compilation
, collectionExpr.Syntax.Location);
504
SymbolDistinguisher distinguisher = new SymbolDistinguisher(this.
Compilation
, inferredType.Type, iterationVariableType.Type);
590
IsIEnumerableT(builder.CollectionType.OriginalDefinition, IsAsync,
Compilation
) ||
1082
this.
Compilation
.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T) :
1083
this.
Compilation
.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T));
1106
getEnumeratorMethod = (MethodSymbol)GetWellKnownTypeMember(
Compilation
, WellKnownMember.System_Collections_Generic_IAsyncEnumerable_T__GetAsyncEnumerator,
1142
Debug.Assert(enumeratorType.OriginalDefinition.Equals(
Compilation
.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerator_T)));
1152
currentPropertyGetter = (MethodSymbol)GetWellKnownTypeMember(
Compilation
, WellKnownMember.System_Collections_Generic_IAsyncEnumerator_T__get_Current, diagnostics, errorLocationSyntax.Location, isOptional: false);
1272
NamedTypeSymbol targetInterface = isAsync ? this.
Compilation
.GetWellKnownType(WellKnownType.System_IAsyncDisposable) : this.
Compilation
.GetSpecialType(SpecialType.System_IDisposable);
1282
enumeratorType.ContainingModule !=
Compilation
.SourceModule &&
1283
!LocalRewriter.CanRewriteForEachAsFor(
Compilation
, syntax, collectionType, out _, out _, BindingDiagnosticBag.Discarded))
1319
TypeSymbol.Equals(builder.GetEnumeratorInfo.Method.ReturnType, this.
Compilation
.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2));
1777
return type.OriginalDefinition.Equals(
Compilation
.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T));
1800
NamedTypeSymbol implementedIEnumerable = GetIEnumerableOfT(type, isAsync,
Compilation
, ref useSiteInfo, out foundMultiple, out bool needSupportForRefStructInterfaces);
1809
var implementedNonGeneric = this.
Compilation
.GetSpecialType(SpecialType.System_Collections_IEnumerable);
1818
if (implementedIEnumerable is not null && needSupportForRefStructInterfaces && type.ContainingModule !=
Compilation
.SourceModule &&
1819
!LocalRewriter.CanRewriteForEachAsFor(
Compilation
, collectionSyntax, type, out _, out _, BindingDiagnosticBag.Discarded))
Binder\HostObjectModeBinder.cs (1)
24
TypeSymbol result = this.
Compilation
.GetHostObjectTypeSymbol();
Binder\InContainerBinder.cs (2)
48
return ((object)merged != null) ? merged.GetConstituentForCompilation(this.
Compilation
) : _container;
91
return TypeWithAnnotations.Create(this.
Compilation
.GetSpecialType(SpecialType.System_Object));
Binder\InMethodBinder.cs (1)
139
var elementType = GetIteratorElementTypeFromReturnType(
Compilation
, refKind, returnType, errorLocation: null, diagnostics: null);
Binder\InSubmissionClassBinder.cs (3)
36
for (var submission = this.
Compilation
; submission != null; submission = submission.PreviousSubmission)
55
internal override ImmutableArray<AliasAndExternAliasDirective> ExternAliases => ((SourceNamespaceSymbol)
Compilation
.SourceModule.GlobalNamespace).GetExternAliases(_declarationSyntax);
57
internal override ImmutableArray<AliasAndUsingDirective> UsingAliases => ((SourceNamespaceSymbol)
Compilation
.SourceModule.GlobalNamespace).GetUsingAliases(_declarationSyntax, basesBeingResolved: null);
Binder\LockBinder.cs (2)
46
if (expr.ConstantValueOpt != ConstantValue.Null ||
Compilation
.FeatureStrictEnabled) // Dev10 allows the null literal.
52
else if (!exprType.IsReferenceType && (exprType.IsValueType ||
Compilation
.FeatureStrictEnabled))
Binder\Semantics\Conversions\Conversions.cs (3)
25
: base(binder.
Compilation
.Assembly.CorLibrary, currentRecursionDepth, includeNullability, otherNullabilityOpt)
36
protected override CSharpCompilation Compilation { get { return _binder.
Compilation
; } }
258
GetDelegateOrFunctionPointerArguments(source.Syntax, analyzedArguments, delegateInvokeMethodOpt.Parameters, binder.
Compilation
);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
393
TypeSymbol systemDelegateType = _binder.
Compilation
.GetSpecialType(SpecialType.System_Delegate);
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
302
binder.
Compilation
,
1513
Conversions.GetDelegateOrFunctionPointerArguments(source.Syntax, analyzedArguments, delegateParameters, binder.
Compilation
);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (10)
40
get { return _binder.
Compilation
; }
55
bool value = _binder.
Compilation
.FeatureStrictEnabled;
1321
(binder.
Compilation
.LanguageVersion > LanguageVersion.CSharp12 || member.ContainingModule == binder.
Compilation
.SourceModule)))
1340
var collectionTypeKind = ConversionsBase.GetCollectionExpressionTypeKind(binder.
Compilation
, type, out elementType);
2974
if (_binder.
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureImprovedInterpolatedStrings) &&
3983
if (argRefKind == RefKind.Ref && binder.
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters))
3993
else if (AreRefsCompatibleForMethodConversion(candidateMethodParameterRefKind: paramRefKind, delegateParameterRefKind: argRefKind, binder.
Compilation
))
4457
var extensionTypeArguments = MethodTypeInferrer.InferTypeArgumentsFromReceiverType(member.ContainingType, args[0], _binder.
Compilation
, _binder.Conversions, ref useSiteInfo);
4468
_binder.
Compilation
,
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (7)
241
if (HadAmbiguousBestMethods(binder.
Compilation
, diagnostics, symbols, location, isExtension))
264
if (HadAmbiguousWorseMethods(binder.
Compilation
, diagnostics, symbols, location, queryClause != null, receiver, name, isExtension))
341
if (HadConstructedParameterFailedConstraintCheck(binder.Conversions, binder.
Compilation
, diagnostics, location))
1295
!(refArg == RefKind.Ref && refParameter == RefKind.In && binder.
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters)) &&
1306
else if (refArg == RefKind.Ref && refParameter == RefKind.In && !binder.
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters))
1314
binder.
Compilation
.LanguageVersion.ToDisplayString(),
1384
SymbolDistinguisher distinguisher = new SymbolDistinguisher(binder.
Compilation
, displayArg, unwrapIfParamsCollection(badArg, parameter, isLastParameter));
Binder\SwitchBinder_Patterns.cs (3)
46
compilation: this.
Compilation
,
61
if (!wasReported && diagnostics.AccumulatesDiagnostics && DecisionDagBuilder.EnableRedundantPatternsCheck(this.
Compilation
))
63
DecisionDagBuilder.CheckRedundantPatternsForSwitchStatement(this.
Compilation
, syntax: node, boundSwitchGoverningExpression, switchSections, diagnostics);
Binder\SwitchExpressionBinder.cs (3)
42
if (!wasReported && diagnostics.AccumulatesDiagnostics && DecisionDagBuilder.EnableRedundantPatternsCheck(this.
Compilation
))
44
DecisionDagBuilder.CheckRedundantPatternsForSwitchExpression(this.
Compilation
, node, boundInputExpression, switchArms, diagnostics);
72
decisionDag = DecisionDagBuilder.CreateDecisionDagForSwitchExpression(this.
Compilation
, node, boundInputExpression, switchArms, defaultLabel, diagnostics);
Binder\UsingStatementBinder.cs (6)
207
MessageID.IDS_FeatureDisposalPattern.CheckFeatureAvailability(diagnostics, originalBinder.
Compilation
, syntax.Location);
251
awaitableType = originalBinder.
Compilation
.GetWellKnownType(WellKnownType.System_Threading_Tasks_ValueTask);
256
var disposeMethod = originalBinder.
Compilation
.GetSpecialTypeMember(SpecialMember.System_IDisposable__Dispose);
303
(fromExpression ? expressionOpt!.Type : declarationTypeOpt)!.ContainingModule != originalBinder.
Compilation
.SourceModule)
314
? originalBinder.
Compilation
.GetWellKnownType(WellKnownType.System_IAsyncDisposable)
315
: originalBinder.
Compilation
.GetSpecialType(SpecialType.System_IDisposable);
Binder\WithExternAndUsingAliasesBinder.cs (1)
178
foreach (var declaration in ((SourceNamespaceSymbol)
Compilation
.SourceModule.GlobalNamespace).MergedDeclaration.Declarations)
BoundTree\UnboundLambda.cs (10)
156
var compilation = Binder.
Compilation
;
238
var useSiteInfo = withDependencies ? new CompoundUseSiteInfo<AssemblySymbol>(binder.
Compilation
.Assembly) : CompoundUseSiteInfo<AssemblySymbol>.DiscardedDependencies;
334
binder.
Compilation
.GetWellKnownType(WellKnownType.System_Threading_Tasks_Task);
349
binder.
Compilation
.GetWellKnownType(WellKnownType.System_Threading_Tasks_Task_T);
803
returnType = TypeWithAnnotations.Create(Binder.
Compilation
.GetSpecialType(SpecialType.System_Void));
828
var compilation = Binder.
Compilation
;
901
if (Binder.MethodOrLambdaRequiresValue(lambdaSymbol, this.Binder.
Compilation
))
939
Binder.
Compilation
,
1021
? TypeWithAnnotations.Create(this.Binder.
Compilation
.GetSpecialType(SpecialType.System_Void))
1277
? this.Binder.
Compilation
.GetSpecialType(SpecialType.System_Void)
BoundTree\VariablePendingInference.cs (1)
45
type = TypeWithAnnotations.Create(binderOpt!.
Compilation
.ImplicitlyTypedVariableInferenceFailedType);
Compilation\CSharpSemanticModel.cs (4)
1697
if (SourceNamedTypeSymbol.ReduceExtensionMember(binder.
Compilation
, symbol, receiverType, wasExtensionFullyInferred: out _) is { } compatibleSubstitutedMember)
4604
binder.
Compilation
);
4619
binder.
Compilation
);
4666
binder.
Compilation
);
Compiler\MethodCompiler.cs (1)
1950
var compilation = bodyBinder.
Compilation
;
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
75
var code = tree.IsGeneratedCode(binder.
Compilation
.Options.SyntaxTreeOptionsProvider, CancellationToken.None)
FlowAnalysis\NullableWalker.cs (4)
1688
binder.
Compilation
,
1763
var compilation = binder.
Compilation
;
5165
var walker = new NullableWalker(binder.
Compilation
,
5207
reportRemainingWarnings: false, reportTopLevelWarnings: false).ToTypeWithAnnotations(binder.
Compilation
);
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
26
CallingConvention callingConvention = getCallingConvention(typeBinder.
Compilation
, syntax.CallingConvention, customModifiers, diagnostics);
Symbols\FunctionTypeSymbol.cs (1)
88
if (_binder.
Compilation
.TestOnlyCompilationData is InferredDelegateTypeData data &&
Symbols\Source\LambdaSymbol.cs (2)
175
var runtimeAsyncEnabledDuringInference = IsAsync && _binder.
Compilation
.IsRuntimeAsyncEnabledIn(this);
179
_runtimeAsyncEnabledChangedDuringInference = IsAsync && runtimeAsyncEnabledDuringInference != _binder.
Compilation
.IsRuntimeAsyncEnabledIn(this);
Symbols\Source\LocalFunctionSymbol.cs (1)
45
Debug.Assert(containingSymbol.DeclaringCompilation == binder.
Compilation
);
Symbols\Source\ParameterHelpers.cs (1)
228
bool allowShadowingNames = withTypeParametersBinder.
Compilation
.IsFeatureEnabled(MessageID.IDS_FeatureNameShadowingInNestedFunctions) &&
Symbols\Source\SourceDelegateMethodSymbol.cs (2)
80
if (binder.
Compilation
.GetSpecialType(SpecialType.System_IAsyncResult).TypeKind != TypeKind.Error &&
81
binder.
Compilation
.GetSpecialType(SpecialType.System_AsyncCallback).TypeKind != TypeKind.Error &&
Symbols\Source\SourceLocalSymbol.cs (1)
84
Debug.Assert(containingSymbol.DeclaringCompilation == scopeBinder.
Compilation
);
Symbols\Source\SourceParameterSymbol.cs (1)
52
Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(context.
Compilation
,
Symbols\Symbol_Attributes.cs (1)
876
if (!boundAttribute.HasErrors && ValidateAttributeUsage(boundAttribute, attributeSyntax, binder.
Compilation
, symbolPart, diagnostics, uniqueAttributeTypes))