700 references to MessageID
Microsoft.CodeAnalysis.CSharp (700)
Binder\Binder.QueryUnboundLambdaState.cs (2)
51public override MessageID MessageID { get { return MessageID.IDS_FeatureQueryExpression; } } // TODO: what is the correct ID here?
Binder\Binder.ValueChecks.cs (15)
713Error(diagnostics, ErrorCode.ERR_BadSKknown, node, ns.NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 718Error(diagnostics, ErrorCode.ERR_BadSKknown, node, type.Type, MessageID.IDS_SK_TYPE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 729Error(diagnostics, GetMethodGroupOrFunctionPointerLvalueError(valueKind), node, unconvertedAddressOf.Operand.Name, MessageID.IDS_AddressOfMethodGroup.Localize()); 740Error(diagnostics, GetMethodGroupOrFunctionPointerLvalueError(valueKind), node, methodGroup.Name, MessageID.IDS_MethodGroup.Localize()); 994Error(diagnostics, ErrorCode.ERR_BadSKknown, expr.Syntax, ((BoundNamespaceExpression)expr).NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize(), MessageID.IDS_SK_VARIABLE.Localize()); 997Error(diagnostics, ErrorCode.ERR_BadSKunknown, expr.Syntax, expr.Type, MessageID.IDS_SK_TYPE.Localize()); 1012else if (this.IsDirectlyInIterator && Compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefUnsafeInIteratorAsync)) 1749CheckFeatureAvailability(node, MessageID.IDS_FeatureInitOnlySetters, diagnostics); 3069MessageID cause; 3072cause = MessageID.IDS_FOREACHLOCAL; 3076cause = MessageID.IDS_USINGLOCAL; 3080cause = MessageID.IDS_FIXEDLOCAL;
Binder\Binder_AnonymousTypes.cs (1)
23MessageID.IDS_FeatureAnonymousTypes.CheckFeatureAvailability(diagnostics, node.NewKeyword);
Binder\Binder_Attributes.cs (1)
542CheckFeatureAvailability(namedArgument, MessageID.IDS_FeatureInitOnlySetters, diagnostics);
Binder\Binder_Await.cs (3)
21MessageID.IDS_FeatureAsync.CheckFeatureAvailability(diagnostics, node.AwaitKeyword); 221(nodeOrToken.SyntaxTree as CSharpSyntaxTree)?.Options?.IsFeatureEnabled(MessageID.IDS_AwaitInCatchAndFinally) == false) 227(nodeOrToken.SyntaxTree as CSharpSyntaxTree)?.Options?.IsFeatureEnabled(MessageID.IDS_AwaitInCatchAndFinally) == false)
Binder\Binder_Constraints.cs (4)
216CheckFeatureAvailability(syntax, MessageID.IDS_FeatureDefaultTypeParameterConstraint, diagnostics); 319CheckFeatureAvailability(allowsConstraint, MessageID.IDS_FeatureAllowsRefStructConstraint, diagnostics); 566CheckFeatureAvailability(syntax, MessageID.IDS_FeatureEnumGenericTypeConstraint, diagnostics); 571CheckFeatureAvailability(syntax, MessageID.IDS_FeatureDelegateGenericTypeConstraint, diagnostics);
Binder\Binder_Conversions.cs (4)
421CheckFeatureAvailability(syntax, MessageID.IDS_FeatureStaticAbstractMembersInInterfaces, diagnostics); 433CheckFeatureAvailability(syntax, MessageID.IDS_FeatureCheckedUserDefinedOperators, diagnostics); 444CheckFeatureAvailability(syntax, MessageID.IDS_FeatureInlineArrays, diagnostics); 488CheckFeatureAvailability(syntax, MessageID.IDS_FeatureFirstClassSpan, diagnostics);
Binder\Binder_Crefs.cs (2)
371CheckFeatureAvailability(syntax, MessageID.IDS_FeatureNativeInt, diagnostics); 938CheckFeatureAvailability(parameter.ReadOnlyKeyword, MessageID.IDS_FeatureRefReadonlyParameters, diagnostics, forceWarning: true);
Binder\Binder_Deconstruct.cs (4)
45MessageID.IDS_FeatureMixedDeclarationsAndExpressionsInDeconstruction 54MessageID.IDS_FeatureMixedDeclarationsAndExpressionsInDeconstruction 765MessageID.IDS_FeatureTuples.CheckFeatureAvailability(diagnostics, component.Designation); 773MessageID.IDS_FeatureTuples.CheckFeatureAvailability(diagnostics, node);
Binder\Binder_Expressions.cs (47)
420if (CheckFeatureAvailability(syntax, MessageID.IDS_FeatureInferredDelegateType, diagnostics)) 714MessageID.IDS_FeatureDefaultLiteral.CheckFeatureAvailability(diagnostics, node); 874MessageID.IDS_FeatureThrowExpression.CheckFeatureAvailability(diagnostics, node.ThrowKeyword); 997MessageID.IDS_FeatureTuples.CheckFeatureAvailability(diagnostics, node); 1515case ManagedKind.UnmanagedWithGenerics when MessageID.IDS_FeatureUnmanagedConstructedTypes.GetFeatureAvailabilityDiagnosticInfo(compilation) is CSDiagnosticInfo diagnosticInfo: 1533MessageID.IDS_FeatureDefault.CheckFeatureAvailability(diagnostics, node.Keyword); 1825CheckFeatureAvailability(node, MessageID.IDS_FeatureDiscards, diagnostics); 2265if (!IsInsideNameof || (EnclosingNameofArgument != node && !node.IsFeatureEnabled(MessageID.IDS_FeatureInstanceMemberInNameof))) 2299CheckFeatureAvailability(node, MessageID.IDS_FeatureInstanceMemberInNameof, diagnostics); 2559CheckFeatureAvailability(node, MessageID.IDS_FeatureIndexOperator, diagnostics); 2600CheckFeatureAvailability(node, MessageID.IDS_FeatureRangeOperator, diagnostics); 2781diagnostics.Add(ErrorCode.ERR_NoExplicitConv, syntax.Location, MessageID.IDS_SK_METHOD.Localize(), targetType); 2955nameString = MessageID.IDS_Lambda.Localize().ToString(); 3090MessageID.IDS_FeatureReadOnlyReferences.CheckFeatureAvailability(diagnostics, argumentSyntax.RefKindKeyword); 3095MessageID.IDS_FeatureOutVar.CheckFeatureAvailability(diagnostics, argumentSyntax.RefKindKeyword); 3173CheckFeatureAvailability(declarationExpression, MessageID.IDS_FeatureExpressionVariablesInQueriesAndInitializers, diagnostics); 3251CheckFeatureAvailability(syntax, MessageID.IDS_FeatureRefUnsafeInIteratorAsync, diagnostics); 3291CheckFeatureAvailability(nameColonSyntax, MessageID.IDS_FeatureNamedArgument, diagnostics); 3338new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureNonTrailingNamedArguments.RequiredVersion())); 3410if (!Compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters)) 3417var available = CheckFeatureAvailability(argument.Syntax, MessageID.IDS_FeatureRefReadonlyParameters, diagnostics); 4063MessageID.IDS_FeatureImplicitArray.CheckFeatureAvailability(diagnostics, node.NewKeyword); 4528LanguageVersion requiredVersion = MessageID.IDS_FeatureNestedStackalloc.RequiredVersion(); 4534MessageID.IDS_FeatureNestedStackalloc.CheckFeatureAvailability(diagnostics, node.GetFirstToken()); 4553CheckFeatureAvailability(node, MessageID.IDS_FeatureRefStructs, diagnostics); 4616MessageID.IDS_FeatureStackAllocInitializer.CheckFeatureAvailability(diagnostics, stackAllocKeyword); 5116MessageID.IDS_FeatureImplicitObjectCreation.CheckFeatureAvailability(diagnostics, node.NewKeyword); 5203MessageID.IDS_FeatureCollectionExpressions.CheckFeatureAvailability(diagnostics, syntax, syntax.OpenBracketToken.GetLocation()); 5628MessageID.IDS_FeatureObjectInitializer.CheckFeatureAvailability(diagnostics, initializerSyntax.OpenBraceToken); 5832MessageID.IDS_FeatureDictionaryInitializer.CheckFeatureAvailability(diagnostics, implicitIndexing.ArgumentList.OpenBracketToken); 5930MessageID.IDS_FeatureImplicitIndexerInitializer.CheckFeatureAvailability(diagnostics, implicitIndexer.Syntax); 6203MessageID.IDS_FeatureCollectionInitializer.CheckFeatureAvailability(diagnostics, initializerSyntax.OpenBraceToken); 6264CheckFeatureAvailability(node, MessageID.IDS_FeatureRefStructInterfaces, diagnostics); 7332MessageID.IDS_FeatureRawStringLiterals.CheckFeatureAvailability(diagnostics, node); 7345CheckFeatureAvailability(node, MessageID.IDS_FeatureRawStringLiterals, diagnostics); 7348CheckFeatureAvailability(node, MessageID.IDS_FeatureUtf8StringLiterals, diagnostics); 7645var msgId = ((UnboundLambda)boundLeft).MessageID; 7844CheckFeatureAvailability(boundLeft.Syntax, MessageID.IDS_FeatureStaticAbstractMembersInInterfaces, diagnostics); 7876Compilation.LanguageVersion < MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion()) 7905Error(diagnostics, ErrorCode.ERR_BadSKunknown, methodGroup.NameSyntax, method, MessageID.IDS_SK_METHOD.Localize()); 8562CheckFeatureAvailability(node, MessageID.IDS_FeatureIndexingMovableFixedBuffers, diagnostics); 8608CheckFeatureAvailability(node, MessageID.IDS_FeatureRefFields, diagnostics); 8817else if (CheckFeatureAvailability(node, MessageID.IDS_FeatureInstanceMemberInNameof, diagnostics)) 9187CheckFeatureAvailability(node, MessageID.IDS_FeatureInlineArrays, diagnostics); 9945_ = MessageID.IDS_FeatureIndexOperator.CheckFeatureAvailability(diagnostics, syntax); 10942MessageID.IDS_FeatureNullPropagatingOperator.CheckFeatureAvailability(diagnostics, node.OperatorToken); 11119var msgId = ((UnboundLambda)receiver).MessageID;
Binder\Binder_Flags.cs (1)
100var withoutUnsafe = isIteratorBody && this.Compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefUnsafeInIteratorAsync);
Binder\Binder_InterpolatedString.cs (10)
21if (CheckFeatureAvailability(node, MessageID.IDS_FeatureInterpolatedStrings, diagnostics)) 27CheckFeatureAvailability(node, MessageID.IDS_FeatureRawStringLiterals, diagnostics); 32if (startText.StartsWith("@$\"") && !Compilation.IsFeatureEnabled(MessageID.IDS_FeatureAltInterpolatedVerbatimStrings)) 37new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureAltInterpolatedVerbatimStrings.RequiredVersion())); 53var newLinesInInterpolationsAllowed = this.Compilation.IsFeatureEnabled(MessageID.IDS_FeatureNewLinesInInterpolations); 86new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureNewLinesInInterpolations.RequiredVersion())); 662CheckFeatureAvailability(syntax, MessageID.IDS_FeatureImprovedInterpolatedStrings, diagnostics); 664else if (!Compilation.IsFeatureEnabled(MessageID.IDS_FeatureImprovedInterpolatedStrings) && diagnostics.AccumulatesDiagnostics) 689CheckFeatureAvailability(value.Syntax, MessageID.IDS_FeatureImprovedInterpolatedStrings, diagnostics); 699CheckFeatureAvailability(value.Syntax, MessageID.IDS_FeatureImprovedInterpolatedStrings, diagnostics);
Binder\Binder_Invocation.cs (8)
160MessageID msgId; 163msgId = MessageID.IDS_SK_FIELD; 167msgId = MessageID.IDS_SK_PROPERTY; 175MessageID.IDS_SK_METHOD.Localize()); 1240CheckFeatureAvailability(receiverArgument.Syntax, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 1246CheckFeatureAvailability(receiverArgument.Syntax, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 1738MessageID.IDS_FeatureParamsCollections.CheckFeatureAvailability(diagnostics, node); 2222CheckFeatureAvailability(node, MessageID.IDS_FeatureNameof, diagnostics);
Binder\Binder_Lambda.cs (9)
60MessageID.IDS_FeatureLambda.CheckFeatureAvailability(diagnostics, lambdaSyntax.ArrowToken); 90MessageID.IDS_FeatureAnonDelegates.CheckFeatureAvailability(diagnostics, anon.DelegateKeyword); 108MessageID.IDS_FeatureAsync.CheckFeatureAvailability(diagnostics, modifier); 113MessageID.IDS_FeatureStaticAnonymousFunction.CheckFeatureAvailability(diagnostics, modifier); 158MessageID.IDS_FeatureLambdaOptionalParameters.CheckFeatureAvailability(diagnostics, p.Default.EqualsToken); 269MessageID.IDS_FeatureLambdaAttributes.CheckFeatureAvailability(diagnostics, attributeList); 282MessageID.IDS_FeatureLambdaReturnType.CheckFeatureAvailability(diagnostics, syntax); 383bool allowShadowingNames = binder.Compilation.IsFeatureEnabled(MessageID.IDS_FeatureNameShadowingInNestedFunctions); 401MessageID.IDS_FeatureLambdaDiscardParameters.CheckFeatureAvailability(
Binder\Binder_Lookup.cs (4)
1780diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_HasNoTypeVars, namedType, MessageID.IDS_SK_TYPE.Localize()) : null; 1785diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadArity, namedType, MessageID.IDS_SK_TYPE.Localize(), namedType.Arity) : null; 1801diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_HasNoTypeVars, method, MessageID.IDS_SK_METHOD.Localize()) : null; 1806diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadArity, method, MessageID.IDS_SK_METHOD.Localize(), method.Arity) : null;
Binder\Binder_NameConflicts.cs (1)
100bool allowShadowing = Compilation.IsFeatureEnabled(MessageID.IDS_FeatureNameShadowingInNestedFunctions);
Binder\Binder_Operators.cs (15)
548CheckFeatureAvailability(node, MessageID.IDS_FeatureTupleEquality, diagnostics); 1386Binder.CheckFeatureAvailability(node, MessageID.IDS_DefaultInterfaceImplementation, diagnostics); 2401result = CheckFeatureAvailability(node, MessageID.IDS_FeatureStaticAbstractMembersInInterfaces, diagnostics); 2412result = CheckFeatureAvailability(node, MessageID.IDS_FeatureStaticAbstractMembersInInterfaces, diagnostics); 2420result &= CheckFeatureAvailability(node, MessageID.IDS_FeatureUnsignedRightShift, diagnostics); 2431result &= CheckFeatureAvailability(node, MessageID.IDS_FeatureCheckedUserDefinedOperators, diagnostics); 2435result &= CheckFeatureAvailability(node, MessageID.IDS_FeatureUnsignedRightShift, diagnostics); 2446MessageID.IDS_FeatureNullableReferenceTypes.CheckFeatureAvailability(diagnostics, node.OperatorToken); 3232((CSharpParseOptions)node.SyntaxTree.Options).IsFeatureEnabled(MessageID.IDS_FeaturePatternMatching)) 3279if (wasUnderscore && ((CSharpParseOptions)node.SyntaxTree.Options).IsFeatureEnabled(MessageID.IDS_FeatureRecursivePatterns)) 4036CheckFeatureAvailability(node, MessageID.IDS_FeatureUnconstrainedTypeParameterInNullCoalescingOperator, diagnostics); 4174MessageID.IDS_FeatureCoalesceAssignmentExpression.CheckFeatureAvailability(diagnostics, node.OperatorToken); 4295CheckFeatureAvailability(node, MessageID.IDS_FeatureRefConditional, diagnostics); 4450CheckFeatureAvailability(syntax, MessageID.IDS_FeatureNativeInt, diagnostics); 4466CheckFeatureAvailability(syntax, MessageID.IDS_FeatureNativeInt, diagnostics);
Binder\Binder_Patterns.cs (22)
20MessageID.IDS_FeaturePatternMatching.CheckFeatureAvailability(diagnostics, node.IsKeyword); 147MessageID.IDS_FeatureRecursivePatterns.CheckFeatureAvailability(diagnostics, node.SwitchKeyword); 197MessageID.IDS_FeatureParenthesizedPattern.CheckFeatureAvailability(diagnostics, node.OpenParenToken); 295CheckFeatureAvailability(node, MessageID.IDS_FeatureListPattern, diagnostics); 403MessageID.IDS_FeatureRecursivePatterns.CheckFeatureAvailability(diagnostics, node); 445CheckFeatureAvailability(innerExpression, MessageID.IDS_FeatureTypePattern, diagnostics); 574CheckFeatureAvailability(patternExpression, MessageID.IDS_FeatureNullPointerConstantPattern, diagnostics); 630var requiredVersion = MessageID.IDS_FeatureRecursivePatterns.RequiredVersion(); 654if (MessageID.IDS_FeatureSpanCharConstantPattern.CheckFeatureAvailability(diagnostics, Compilation, node.Location)) 773LanguageVersion requiredVersion = MessageID.IDS_FeatureGenericPatternMatching.RequiredVersion(); 888CheckFeatureAvailability(designation, MessageID.IDS_FeatureExpressionVariablesInQueriesAndInitializers, diagnostics); 963MessageID.IDS_FeatureRecursivePatterns.CheckFeatureAvailability(diagnostics, node); 1091MessageID.IDS_FeatureExtendedPropertyPatterns.CheckFeatureAvailability(diagnostics, subPattern.ExpressionColon.ColonToken); 1246if (Compilation.LanguageVersion < MessageID.IDS_FeatureRecursivePatterns.RequiredVersion()) 1324|| (inputType.IsPointerType() && Compilation.LanguageVersion < MessageID.IDS_FeatureRecursivePatterns.RequiredVersion())) 1372MessageID.IDS_FeatureRecursivePatterns.CheckFeatureAvailability(diagnostics, node); 1469MessageID.IDS_FeatureExtendedPropertyPatterns.CheckFeatureAvailability(diagnostics, p.ExpressionColon.ColonToken); 1616MessageID.IDS_FeatureTypePattern.CheckFeatureAvailability(diagnostics, node); 1629MessageID.IDS_FeatureRelationalPattern.CheckFeatureAvailability(diagnostics, node.OperatorToken); 1723MessageID.IDS_FeatureNotPattern.CheckFeatureAvailability(diagnostics, node.OperatorToken); 1787MessageID.IDS_FeatureOrPattern.CheckFeatureAvailability(diagnostics, node.OperatorToken); 1854MessageID.IDS_FeatureAndPattern.CheckFeatureAvailability(diagnostics, node.OperatorToken);
Binder\Binder_Query.cs (6)
26MessageID.IDS_FeatureQueryExpression.CheckFeatureAvailability(diagnostics, node.FromClause.FromKeyword); 773CheckFeatureAvailability(expression, MessageID.IDS_FeatureExpressionVariablesInQueriesAndInitializers, diagnostics, locals[0].GetFirstLocation()); 949diagnostics.Add(ErrorCode.ERR_BadSKunknown, ultimateReceiver.Syntax.Location, ((BoundNamespaceExpression)ultimateReceiver).NamespaceSymbol, MessageID.IDS_SK_NAMESPACE.Localize()); 954diagnostics.Add(ErrorCode.ERR_QueryNoProvider, node.Location, MessageID.IDS_AnonMethod.Localize(), methodName); 970diagnostics.Add(ErrorCode.ERR_QueryNoProvider, node.Location, MessageID.IDS_SK_METHOD.Localize(), methodName); 982Error(diagnostics, ErrorCode.ERR_BadSKunknown, ultimateReceiver.Syntax, ultimateReceiver.Type, MessageID.IDS_SK_TYVAR.Localize());
Binder\Binder_Statements.cs (24)
49CheckFeatureAvailability(attributeList, MessageID.IDS_FeatureLocalFunctionAttributes, diagnostics); 180CheckFeatureAvailability(node.UnsafeKeyword, MessageID.IDS_FeatureRefUnsafeInIteratorAsync, diagnostics); 217MessageID.IDS_FeatureIterators.CheckFeatureAvailability(diagnostics, statement.YieldKeyword); 222MessageID.IDS_FeatureAsyncStreams.CheckFeatureAvailability( 270else if (InUnsafeRegion && Compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefUnsafeInIteratorAsync)) 396if (Compilation.LanguageVersion < MessageID.IDS_FeatureSwitchExpression.RequiredVersion()) 556MessageID.IDS_FeatureLocalFunctions.CheckFeatureAvailability(diagnostics, node.Identifier); 601MessageID.IDS_FeatureStaticLocalFunctions.CheckFeatureAvailability(diagnostics, modifier); 603MessageID.IDS_FeatureExternLocalFunctions.CheckFeatureAvailability(diagnostics, modifier); 1166return !CheckFeatureAvailability(identifierToken, MessageID.IDS_FeatureRefUnsafeInIteratorAsync, diagnostics); 1289bool extensibleFixedEnabled = ((CSharpParseOptions)initializerOpt.SyntaxTree.Options)?.IsFeatureEnabled(MessageID.IDS_FeatureExtensibleFixedStatement) != false; 1300CheckFeatureAvailability(initializerOpt.Syntax, MessageID.IDS_FeatureExtensibleFixedStatement, diagnostics); 1420MessageID.IDS_FeatureRefReassignment.CheckFeatureAvailability(diagnostics, node.Right.GetFirstToken()); 1610return MessageID.IDS_ArrayAccess.Localize(); 1614return MessageID.IDS_PointerElementAccess.Localize(); 2488syntax.IsFeatureEnabled(MessageID.IDS_FeatureInferredDelegateType)) 3351MessageID.IDS_FeatureExceptionFilter.CheckFeatureAvailability(diagnostics, filter.WhenKeyword); 3549ConstructorDeclarationSyntax or DestructorDeclarationSyntax => MessageID.IDS_FeatureExpressionBodiedDeOrConstructor, 3550AccessorDeclarationSyntax => MessageID.IDS_FeatureExpressionBodiedAccessor, 3551BaseMethodDeclarationSyntax => MessageID.IDS_FeatureExpressionBodiedMethod, 3552IndexerDeclarationSyntax => MessageID.IDS_FeatureExpressionBodiedIndexer, 3553PropertyDeclarationSyntax => MessageID.IDS_FeatureExpressionBodiedProperty, 3557LocalFunctionStatementSyntax => (MessageID?)null, 3664MessageID.IDS_TopLevelStatements.CheckFeatureAvailability(diagnostics, topLevelStatement);
Binder\Binder_Symbols.cs (24)
115CheckFeatureAvailability(syntax, MessageID.IDS_FeatureImplicitLocal, diagnostics); 159CheckFeatureAvailability(syntax, MessageID.IDS_FeatureUnmanagedGenericTypeConstraint, diagnostics); 162CheckFeatureAvailability(identifierSyntax, MessageID.IDS_FeatureNotNullGenericTypeConstraint, diagnostics); 340var diagnosticInfo = diagnostics.Add(ErrorCode.ERR_BadSKknown, syntax.Location, syntax, symbol.Symbol.GetKindText(), MessageID.IDS_SK_TYPE.Localize()); 449MessageID.IDS_FeatureFunctionPointers.CheckFeatureAvailability(diagnostics, functionPointerTypeSyntax.DelegateKeyword); 540MessageID.IDS_FeatureNullable.CheckFeatureAvailability(diagnostics, nullableSyntax.QuestionToken); 577MessageID.IDS_FeatureGlobalNamespace.CheckFeatureAvailability(diagnostics, node.Alias); 617var requiredVersion = MessageID.IDS_FeatureDefaultTypeParameterConstraint.RequiredVersion(); 678MessageID.IDS_FeatureTuples.CheckFeatureAvailability(diagnostics, syntax); 733bool includeNullability = Compilation.IsFeatureEnabled(MessageID.IDS_FeatureNullableReferenceTypes); 931if (Compilation.LanguageVersion < MessageID.IDS_FeatureDynamic.RequiredVersion()) 1022CheckFeatureAvailability(node, MessageID.IDS_FeatureNativeInt, diagnostics); 1358var binder = !Compilation.IsFeatureEnabled(MessageID.IDS_FeatureUsingTypeAlias) 1379CheckFeatureAvailability(typeSyntax, MessageID.IDS_FeatureUnboundGenericTypesInNameof, diagnostics); 1399Error(diagnostics, ErrorCode.ERR_BadArity, typeSyntax, type, MessageID.IDS_SK_TYPE.Localize(), typeArgumentsSyntax.Count); 1431Error(diagnostics, ErrorCode.ERR_BadArity, syntax, plainName, MessageID.IDS_MethodGroup.Localize(), typeArgumentsSyntax.Count); 1581bool includeNullability = Compilation.IsFeatureEnabled(MessageID.IDS_FeatureNullableReferenceTypes); 2738internal static bool CheckFeatureAvailability(SyntaxNode syntax, MessageID feature, BindingDiagnosticBag diagnostics, Location? location = null) 2741internal static bool CheckFeatureAvailability(SyntaxToken syntax, MessageID feature, BindingDiagnosticBag diagnostics, bool forceWarning = false) 2744internal static bool CheckFeatureAvailability(SyntaxTree tree, MessageID feature, BindingDiagnosticBag diagnostics, Location location) 2747private static bool CheckFeatureAvailability(SyntaxNode syntax, MessageID feature, DiagnosticBag? diagnostics, Location? location = null) 2750private static bool CheckFeatureAvailability(SyntaxToken syntax, MessageID feature, DiagnosticBag? diagnostics, bool forceWarning = false) 2753private static bool CheckFeatureAvailability(SyntaxTree tree, MessageID feature, DiagnosticBag? diagnostics, Location location) 2759private static bool CheckFeatureAvailability<TData>(SyntaxTree tree, MessageID feature, DiagnosticBag? diagnostics, TData data, Func<TData, Location> getLocation, bool forceWarning = false)
Binder\Binder_Unsafe.cs (1)
65else if (this.IsIndirectlyInIterator && MessageID.IDS_FeatureRefUnsafeInIteratorAsync.GetFeatureAvailabilityDiagnosticInfo(Compilation) is { } unsafeInIteratorDiagnosticInfo)
Binder\Binder_WithExpression.cs (3)
17MessageID.IDS_FeatureRecords.CheckFeatureAvailability(diagnostics, syntax.WithKeyword); 32CheckFeatureAvailability(syntax, MessageID.IDS_FeatureWithOnStructs, diagnostics); 36CheckFeatureAvailability(syntax, MessageID.IDS_FeatureWithOnAnonymousTypes, diagnostics);
Binder\ExecutableCodeBinder.cs (1)
132MessageID.IDS_FeatureRefUnsafeInIteratorAsync.CheckFeatureAvailability(diagnostics, compilation, errorLocation);
Binder\ForEachLoopBinder.cs (16)
220CheckFeatureAvailability(_syntax.AwaitKeyword, MessageID.IDS_FeatureAsyncStreams, diagnostics); 241var messageId = IsAsync ? MessageID.IDS_FeatureExtensionGetAsyncEnumerator : MessageID.IDS_FeatureExtensionGetEnumerator; 293MessageID.IDS_FeatureRefForEach.CheckFeatureAvailability(diagnostics, typeSyntax); 530CheckFeatureAvailability(foreachKeyword, MessageID.IDS_FeatureRefUnsafeInIteratorAsync, diagnostics); 875CheckFeatureAvailability(collectionExpr.Syntax, MessageID.IDS_FeatureInlineArrays, diagnostics); 1228CheckFeatureAvailability(expr.Syntax, MessageID.IDS_FeatureDisposalPattern, diagnostics); 1271CheckFeatureAvailability(syntax, MessageID.IDS_FeatureRefStructInterfaces, diagnostics); 1449MessageID patternName = isAsync ? MessageID.IDS_FeatureAsyncStreams : MessageID.IDS_Collection; 1485diagnostics.Add(ErrorCode.WRN_PatternIsAmbiguous, collectionSyntax.Location, patternType, MessageID.IDS_Collection.Localize(), 1556diagnostics.Add(ErrorCode.WRN_PatternIsAmbiguous, collectionSyntax.Location, collectionExpr.Type, MessageID.IDS_Collection.Localize(), 1715diagnostics.Add(ErrorCode.WRN_PatternBadSignature, collectionSyntax.Location, enumeratorType, MessageID.IDS_Collection.Localize(), patternMemberCandidate); 1778CheckFeatureAvailability(collectionSyntax, MessageID.IDS_FeatureRefStructInterfaces, diagnostics);
Binder\ForLoopBinder.cs (1)
81MessageID.IDS_FeatureRefFor.CheckFeatureAvailability(diagnostics, type);
Binder\LockBinder.cs (1)
61CheckFeatureAvailability(exprSyntax, MessageID.IDS_FeatureLockObject, diagnostics);
Binder\LookupResult.cs (1)
204var diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadSKknown, unwrappedSymbol.Name, unwrappedSymbol.GetKindText(), MessageID.IDS_SK_TYPE.Localize()) : null;
Binder\Semantics\Conversions\ConversionsBase.cs (1)
3949return Compilation?.IsFeatureEnabled(MessageID.IDS_FeatureFirstClassSpan) != false;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (1)
1705return _compilation?.IsFeatureEnabled(MessageID.IDS_FeatureFirstClassSpan) != false;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (4)
1838if (!Compilation.IsFeatureEnabled(MessageID.IDS_FeatureOverloadResolutionPriority)) 2922if (_binder.Compilation.IsFeatureEnabled(MessageID.IDS_FeatureImprovedInterpolatedStrings) && 3898if (argRefKind == RefKind.Ref && binder.Compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters)) 3945if (compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters) &&
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (3)
1254!(refArg == RefKind.Ref && refParameter == RefKind.In && binder.Compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters)) && 1265else if (refArg == RefKind.Ref && refParameter == RefKind.In && !binder.Compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefReadonlyParameters)) 1274new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureRefReadonlyParameters.RequiredVersion()));
Binder\SwitchBinder.cs (2)
36((CSharpParseOptions)SwitchSyntax.SyntaxTree.Options)?.IsFeatureEnabled(MessageID.IDS_FeaturePatternMatching) != false; 403CheckFeatureAvailability(node, MessageID.IDS_FeatureSwitchOnBool, diagnostics);
Binder\SwitchBinder_Patterns.cs (1)
270MessageID.IDS_FeaturePatternMatching.CheckFeatureAvailability(diagnostics, node.Keyword);
Binder\UsingStatementBinder.cs (4)
98CheckFeatureAvailability(usingKeyword, MessageID.IDS_FeatureUsingDeclarations, diagnostics); 102CheckFeatureAvailability(awaitKeyword, MessageID.IDS_FeatureAsyncUsing, diagnostics); 204MessageID.IDS_FeatureDisposalPattern.CheckFeatureAvailability(diagnostics, originalBinder.Compilation, syntax.Location); 292CheckFeatureAvailability(syntax, MessageID.IDS_FeatureRefStructInterfaces, diagnostics);
BoundTree\Formatting.cs (6)
39get { return ConstantValueOpt?.IsNull == true ? MessageID.IDS_NULL.Localize() : base.Display; } 63get { return MessageID.IDS_MethodGroup.Localize(); } 71get { return MessageID.IDS_ThrowExpression.Localize(); } 161=> (Type is null) ? MessageID.IDS_FeatureSwitchExpression.Localize() : base.Display; 167=> (Type is null) ? MessageID.IDS_FeatureTargetTypedConditional.Localize() : base.Display; 173=> (Type is null) ? MessageID.IDS_FeatureCollectionExpressions.Localize() : base.Display;
BoundTree\UnboundLambda.cs (8)
72public MessageID MessageID { get { return Syntax.Kind() == SyntaxKind.AnonymousMethodExpression ? MessageID.IDS_AnonMethod : MessageID.IDS_Lambda; } } 447public MessageID MessageID { get { return Data.MessageID; } } 551public abstract MessageID MessageID { get; } 1489public override MessageID MessageID { get { return this.UnboundLambda.Syntax.Kind() == SyntaxKind.AnonymousMethodExpression ? MessageID.IDS_AnonMethod : MessageID.IDS_Lambda; } }
CommandLine\CSharpCommandLineParser.cs (23)
208AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "/langversion:"); 280ParseAndResolveReferencePaths(name, valueMemory, baseDirectory, libPaths, MessageID.IDS_LIB_OPTION, diagnostics); 328ParseAndResolveReferencePaths(name, valueMemory, baseDirectory, sourcePaths, MessageID.IDS_REFERENCEPATH_OPTION, diagnostics); 417AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), name); 618AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "modulename"); 666AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), arg); 679AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), arg); 687AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "/doc:"); // Different argument. 699AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "/addmodule:"); 791AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), name); 1048AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "keycontainer"); 1110AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "subsystemversion"); 1131AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), "touchedfiles"); 1421ParseAndResolveReferencePaths(null, additionalReferenceDirectories.AsMemory(), baseDirectory, libPaths, MessageID.IDS_LIB_ENV, diagnostics); 1536if (nullableContextOptions != NullableContextOptions.Disable && parseOptions.LanguageVersion < MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion()) 1540new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion())), Location.None)); 1599private static void ParseAndResolveReferencePaths(string? switchName, ReadOnlyMemory<char>? switchValue, string? baseDirectory, List<string> builder, MessageID origin, List<Diagnostic> diagnostics) 1604AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_PathList.Localize(), switchName); 1613AddDiagnostic(diagnostics, ErrorCode.WRN_InvalidSearchPathDir, path, origin.Localize(), MessageID.IDS_DirectoryHasInvalidPath.Localize()); 1617AddDiagnostic(diagnostics, ErrorCode.WRN_InvalidSearchPathDir, path, origin.Localize(), MessageID.IDS_DirectoryDoesNotExist.Localize()); 1858AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Namespace1.Localize(), arg); 1872AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), arg); 1899AddDiagnostic(diagnostics, ErrorCode.ERR_SwitchNeedsString, MessageID.IDS_Text.Localize(), arg);
CommandLine\CSharpCompiler.cs (5)
277consoleOutput.WriteLine(ErrorFacts.GetMessage(MessageID.IDS_LogoLine1, Culture), GetToolName(), GetCompilerVersion()); 278consoleOutput.WriteLine(ErrorFacts.GetMessage(MessageID.IDS_LogoLine2, Culture)); 284consoleOutput.WriteLine(ErrorFacts.GetMessage(MessageID.IDS_LangVersions, Culture)); 316return ErrorFacts.GetMessage(MessageID.IDS_ToolName, Culture); 325consoleOutput.WriteLine(ErrorFacts.GetMessage(MessageID.IDS_CSCHelp, Culture));
Compilation\CSharpCompilation.cs (4)
2050CheckFeatureAvailability(Candidate.ExtractReturnTypeSyntax(), MessageID.IDS_FeatureAsyncMain, diagnostics)) 2057else if (LanguageVersion >= MessageID.IDS_FeatureAsyncMain.RequiredVersion() && taskEntryPoints.Count > 0) 2991if (Options.NullableContextOptions != NullableContextOptions.Disable && LanguageVersion < MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion() && 2996new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion())), Location.None));
Compilation\CSharpCompilationExtensions.cs (2)
12internal static bool IsFeatureEnabled(this CSharpCompilation compilation, MessageID feature) 17internal static bool IsFeatureEnabled(this SyntaxNode? syntax, MessageID feature)
Compiler\DocumentationCommentCompiler.cs (2)
298string message = ErrorFacts.GetMessage(MessageID.IDS_XMLIGNORED, CultureInfo.CurrentUICulture); 348string message = ErrorFacts.GetMessage(MessageID.IDS_XMLIGNORED, CultureInfo.CurrentUICulture);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (12)
283_diagnostics.Add(ErrorCode.WRN_FailedInclude, location, filePathValue, xpathValue, new LocalizableErrorArgument(MessageID.IDS_OperationCausedStackOverflow)); 286commentMessage = ErrorFacts.GetMessage(MessageID.IDS_XMLNOINCLUDE, CultureInfo.CurrentUICulture); 303var subMessage = hasFileAttribute ? MessageID.IDS_XMLMISSINGINCLUDEPATH.Localize() : MessageID.IDS_XMLMISSINGINCLUDEFILE.Localize(); 305commentMessage = MakeCommentMessage(location, MessageID.IDS_XMLBADINCLUDE); 316commentMessage = MakeCommentMessage(location, MessageID.IDS_XMLFAILEDINCLUDE); 326commentMessage = MakeCommentMessage(location, MessageID.IDS_XMLFAILEDINCLUDE); 347commentMessage = MakeCommentMessage(location, MessageID.IDS_XMLFAILEDINCLUDE); 360commentMessage = MakeCommentMessage(location, MessageID.IDS_XMLFAILEDINCLUDE); 396commentMessage = MakeCommentMessage(location, MessageID.IDS_XMLNOINCLUDE); 409commentMessage = string.Format(ErrorFacts.GetMessage(MessageID.IDS_XMLIGNORED2, CultureInfo.CurrentUICulture), resolvedFilePath); 434private static string MakeCommentMessage(Location location, MessageID messageId)
Compiler\MethodCompiler.cs (2)
617_compilation.LanguageVersion >= MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion() && 1809var isSufficientLangVersion = compilation.LanguageVersion >= MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion();
CSharpParseOptions.cs (1)
259internal bool IsFeatureEnabled(MessageID feature)
Declarations\DeclarationTreeBuilder.cs (11)
480MessageID.IDS_FeatureUsingStatic.CheckFeatureAvailability(diagnostics, usingDirective, usingDirective.StaticKeyword.GetLocation()); 483MessageID.IDS_FeatureGlobalUsing.CheckFeatureAvailability(diagnostics, usingDirective, usingDirective.GlobalKeyword.GetLocation()); 490MessageID.IDS_FeatureExternAlias.CheckFeatureAvailability(diagnostics, externAlias, externAlias.ExternKeyword.GetLocation()); 528MessageID.IDS_FeatureFileScopedNamespace.CheckFeatureAvailability(diagnostics, node, node.NamespaceKeyword.GetLocation()); 728MessageID.IDS_FeatureRecordStructs.CheckFeatureAvailability(diagnostics, record, record.ClassOrStructKeyword.GetLocation()); 741MessageID.IDS_FeaturePrimaryConstructors.CheckFeatureAvailability(diagnostics, node.ParameterList); 746MessageID.IDS_FeaturePrimaryConstructors.CheckFeatureAvailability(diagnostics, node, node.SemicolonToken.GetLocation()); 757MessageID.IDS_FeatureStaticClasses.CheckFeatureAvailability(diagnostics, node, modifier.GetLocation()); 761MessageID.IDS_FeatureReadOnlyStructs.CheckFeatureAvailability(diagnostics, node, modifier.GetLocation()); 765MessageID.IDS_FeatureRefStructs.CheckFeatureAvailability(diagnostics, node, modifier.GetLocation()); 852MessageID.IDS_FeaturePrimaryConstructors.CheckFeatureAvailability(diagnostics, node, node.SemicolonToken.GetLocation());
Errors\ErrorFacts.cs (1)
135public static string GetMessage(MessageID code, CultureInfo culture)
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (2)
66const MessageID featureId = MessageID.IDS_FeatureNullableReferenceTypes;
Errors\MessageID.cs (192)
304private readonly MessageID _id; 306internal LocalizableErrorArgument(MessageID id) 326public static LocalizableErrorArgument Localize(this MessageID id) 337internal static string? RequiredFeature(this MessageID feature) 348this MessageID feature, 362this MessageID feature, 376this MessageID feature, 390this MessageID feature, 404this MessageID feature, 419this MessageID feature, 434this MessageID feature, 447internal static CSDiagnosticInfo? GetFeatureAvailabilityDiagnosticInfo(this MessageID feature, CSharpParseOptions options) 450internal static CSDiagnosticInfo? GetFeatureAvailabilityDiagnosticInfo(this MessageID feature, CSharpCompilation compilation) 453private static CSDiagnosticInfo GetDisabledFeatureDiagnosticInfo(MessageID feature, LanguageVersion availableVersion) 467internal static LanguageVersion RequiredVersion(this MessageID feature) 478case MessageID.IDS_FeatureFieldKeyword: 479case MessageID.IDS_FeatureFirstClassSpan: 480case MessageID.IDS_FeatureUnboundGenericTypesInNameof: 484case MessageID.IDS_FeatureStringEscapeCharacter: // lexer check 485case MessageID.IDS_FeatureImplicitIndexerInitializer: 486case MessageID.IDS_FeatureLockObject: 487case MessageID.IDS_FeatureParamsCollections: 488case MessageID.IDS_FeatureRefUnsafeInIteratorAsync: 489case MessageID.IDS_FeatureRefStructInterfaces: 490case MessageID.IDS_FeatureAllowsRefStructConstraint: 491case MessageID.IDS_FeaturePartialProperties: 492case MessageID.IDS_FeatureOverloadResolutionPriority: 496case MessageID.IDS_FeatureLambdaOptionalParameters: // semantic check 497case MessageID.IDS_FeatureLambdaParamsArray: // semantic check 498case MessageID.IDS_FeaturePrimaryConstructors: // declaration table check 499case MessageID.IDS_FeatureUsingTypeAlias: // semantic check 500case MessageID.IDS_FeatureInstanceMemberInNameof: // semantic check 501case MessageID.IDS_FeatureInlineArrays: // semantic check 502case MessageID.IDS_FeatureCollectionExpressions: // semantic check 503case MessageID.IDS_FeatureRefReadonlyParameters: // semantic check 507case MessageID.IDS_FeatureRawStringLiterals: 508case MessageID.IDS_FeatureStaticAbstractMembersInInterfaces: // semantic check 509case MessageID.IDS_FeatureNewLinesInInterpolations: // semantic check 510case MessageID.IDS_FeatureListPattern: // semantic check 511case MessageID.IDS_FeatureRequiredMembers: // semantic check 512case MessageID.IDS_FeatureCacheStaticMethodGroupConversion: // lowering check 513case MessageID.IDS_FeatureSpanCharConstantPattern: 514case MessageID.IDS_FeatureAutoDefaultStructs: // semantic check 515case MessageID.IDS_FeatureCheckedUserDefinedOperators: // semantic check for declarations, parsing check for doc comments 516case MessageID.IDS_FeatureUtf8StringLiterals: // semantic check 517case MessageID.IDS_FeatureUnsignedRightShift: // semantic check for declarations and consumption, parsing check for doc comments 518case MessageID.IDS_FeatureRelaxedShiftOperator: // semantic check 519case MessageID.IDS_FeatureRefFields: // semantic check 520case MessageID.IDS_FeatureFileTypes: // semantic check 521case MessageID.IDS_FeatureGenericAttributes: // semantic check 525case MessageID.IDS_FeatureMixedDeclarationsAndExpressionsInDeconstruction: // semantic check 526case MessageID.IDS_FeatureSealedToStringInRecord: // semantic check 527case MessageID.IDS_FeatureImprovedInterpolatedStrings: // semantic check 528case MessageID.IDS_FeatureRecordStructs: 529case MessageID.IDS_FeatureWithOnStructs: // semantic check 530case MessageID.IDS_FeatureWithOnAnonymousTypes: // semantic check 531case MessageID.IDS_FeaturePositionalFieldsInRecords: // semantic check 532case MessageID.IDS_FeatureGlobalUsing: 533case MessageID.IDS_FeatureInferredDelegateType: // semantic check 534case MessageID.IDS_FeatureLambdaAttributes: // semantic check 535case MessageID.IDS_FeatureExtendedPropertyPatterns: // semantic check 536case MessageID.IDS_FeatureLambdaReturnType: // semantic check 537case MessageID.IDS_AsyncMethodBuilderOverride: // semantic check 538case MessageID.IDS_FeatureConstantInterpolatedStrings: // semantic check 539case MessageID.IDS_FeatureImplicitImplementationOfNonPublicMembers: // semantic check 540case MessageID.IDS_FeatureFileScopedNamespace: // semantic check 541case MessageID.IDS_FeatureParameterlessStructConstructors: // semantic check 542case MessageID.IDS_FeatureStructFieldInitializers: // semantic check 546case MessageID.IDS_FeatureLambdaDiscardParameters: // semantic check 547case MessageID.IDS_FeatureFunctionPointers: // semantic check 548case MessageID.IDS_FeatureLocalFunctionAttributes: // syntax check 549case MessageID.IDS_FeatureExternLocalFunctions: // semantic check 550case MessageID.IDS_FeatureImplicitObjectCreation: // semantic check 551case MessageID.IDS_FeatureMemberNotNull: 552case MessageID.IDS_FeatureAndPattern: // semantic check 553case MessageID.IDS_FeatureNotPattern: // semantic check 554case MessageID.IDS_FeatureOrPattern: // semantic check 555case MessageID.IDS_FeatureParenthesizedPattern: // semantic check 556case MessageID.IDS_FeatureTypePattern: // semantic check 557case MessageID.IDS_FeatureRelationalPattern: // semantic check 558case MessageID.IDS_FeatureExtensionGetEnumerator: // semantic check 559case MessageID.IDS_FeatureExtensionGetAsyncEnumerator: // semantic check 560case MessageID.IDS_FeatureNativeInt: 561case MessageID.IDS_FeatureExtendedPartialMethods: // semantic check 562case MessageID.IDS_TopLevelStatements: 563case MessageID.IDS_FeatureInitOnlySetters: // semantic check 564case MessageID.IDS_FeatureRecords: // semantic check 565case MessageID.IDS_FeatureTargetTypedConditional: // semantic check 566case MessageID.IDS_FeatureCovariantReturnsForOverrides: // semantic check 567case MessageID.IDS_FeatureStaticAnonymousFunction: // semantic check 568case MessageID.IDS_FeatureModuleInitializers: // semantic check on method attribute 569case MessageID.IDS_FeatureDefaultTypeParameterConstraint: // semantic check 570case MessageID.IDS_FeatureVarianceSafetyForStaticInterfaceMembers: // semantic check 574case MessageID.IDS_FeatureAltInterpolatedVerbatimStrings: // semantic check 575case MessageID.IDS_FeatureCoalesceAssignmentExpression: // semantic check 576case MessageID.IDS_FeatureUnconstrainedTypeParameterInNullCoalescingOperator: 577case MessageID.IDS_FeatureNullableReferenceTypes: // syntax and semantic check 578case MessageID.IDS_FeatureIndexOperator: // semantic check 579case MessageID.IDS_FeatureRangeOperator: // semantic check 580case MessageID.IDS_FeatureAsyncStreams: // semantic check 581case MessageID.IDS_FeatureRecursivePatterns: // semantic check 582case MessageID.IDS_FeatureUsingDeclarations: // semantic check 583case MessageID.IDS_FeatureDisposalPattern: //semantic check 584case MessageID.IDS_FeatureStaticLocalFunctions: // semantic check 585case MessageID.IDS_FeatureNameShadowingInNestedFunctions: 586case MessageID.IDS_FeatureUnmanagedConstructedTypes: // semantic check 587case MessageID.IDS_FeatureObsoleteOnPropertyAccessor: 588case MessageID.IDS_FeatureReadOnlyMembers: 589case MessageID.IDS_DefaultInterfaceImplementation: // semantic check 590case MessageID.IDS_OverrideWithConstraints: // semantic check 591case MessageID.IDS_FeatureNestedStackalloc: // semantic check 592case MessageID.IDS_FeatureNotNullGenericTypeConstraint:// semantic check 593case MessageID.IDS_FeatureSwitchExpression: 594case MessageID.IDS_FeatureAsyncUsing: 595case MessageID.IDS_FeatureNullPointerConstantPattern: //semantic check 599case MessageID.IDS_FeatureAttributesOnBackingFields: // semantic check 600case MessageID.IDS_FeatureImprovedOverloadCandidates: // semantic check 601case MessageID.IDS_FeatureTupleEquality: // semantic check 602case MessageID.IDS_FeatureRefReassignment: // semantic check 603case MessageID.IDS_FeatureRefFor: 604case MessageID.IDS_FeatureRefForEach: // semantic check 605case MessageID.IDS_FeatureEnumGenericTypeConstraint: // semantic check 606case MessageID.IDS_FeatureDelegateGenericTypeConstraint: // semantic check 607case MessageID.IDS_FeatureUnmanagedGenericTypeConstraint: // semantic check 608case MessageID.IDS_FeatureStackAllocInitializer: // semantic check 609case MessageID.IDS_FeatureExpressionVariablesInQueriesAndInitializers: // semantic check 610case MessageID.IDS_FeatureExtensibleFixedStatement: // semantic check 611case MessageID.IDS_FeatureIndexingMovableFixedBuffers: //semantic check 615case MessageID.IDS_FeatureNonTrailingNamedArguments: // semantic check 616case MessageID.IDS_FeatureLeadingDigitSeparator: 617case MessageID.IDS_FeaturePrivateProtected: 618case MessageID.IDS_FeatureReadOnlyReferences: // semantic check 619case MessageID.IDS_FeatureRefStructs: // semantic check 620case MessageID.IDS_FeatureReadOnlyStructs: // semantic check 621case MessageID.IDS_FeatureRefExtensionMethods: 622case MessageID.IDS_FeatureRefConditional: 626case MessageID.IDS_FeatureAsyncMain: 627case MessageID.IDS_FeatureDefaultLiteral: // semantic check 628case MessageID.IDS_FeatureInferredTupleNames: 629case MessageID.IDS_FeatureGenericPatternMatching: 633case MessageID.IDS_FeatureBinaryLiteral: 634case MessageID.IDS_FeatureDigitSeparator: 635case MessageID.IDS_FeatureLocalFunctions: // semantic check 636case MessageID.IDS_FeatureRefLocalsReturns: 637case MessageID.IDS_FeaturePatternMatching: // semantic check 638case MessageID.IDS_FeatureThrowExpression: // semantic check 639case MessageID.IDS_FeatureTuples: 640case MessageID.IDS_FeatureOutVar: // semantic check 641case MessageID.IDS_FeatureExpressionBodiedAccessor: 642case MessageID.IDS_FeatureExpressionBodiedDeOrConstructor: 643case MessageID.IDS_FeatureDiscards: 647case MessageID.IDS_FeatureExceptionFilter: // semantic check 648case MessageID.IDS_FeatureAutoPropertyInitializer: // semantic check 649case MessageID.IDS_FeatureNullPropagatingOperator: // semantic check 650case MessageID.IDS_FeatureExpressionBodiedMethod: 651case MessageID.IDS_FeatureExpressionBodiedProperty: // semantic check 652case MessageID.IDS_FeatureExpressionBodiedIndexer: // semantic check 653case MessageID.IDS_FeatureNameof: 654case MessageID.IDS_FeatureDictionaryInitializer: // semantic check 655case MessageID.IDS_FeatureUsingStatic: // semantic check 656case MessageID.IDS_FeatureInterpolatedStrings: // semantic check 657case MessageID.IDS_AwaitInCatchAndFinally: 658case MessageID.IDS_FeatureReadonlyAutoImplementedProperties: 662case MessageID.IDS_FeatureAsync: // semantic check 666case MessageID.IDS_FeatureDynamic: // Checked in the binder. 667case MessageID.IDS_FeatureTypeVariance: // semantic check 668case MessageID.IDS_FeatureNamedArgument: // semantic check 669case MessageID.IDS_FeatureOptionalParameter: // semantic check 673case MessageID.IDS_FeatureImplicitArray: // semantic check 674case MessageID.IDS_FeatureAnonymousTypes: // semantic check 675case MessageID.IDS_FeatureObjectInitializer: 676case MessageID.IDS_FeatureCollectionInitializer: 677case MessageID.IDS_FeatureLambda: // semantic check 678case MessageID.IDS_FeatureQueryExpression: // semantic check 679case MessageID.IDS_FeatureExtensionMethod: 680case MessageID.IDS_FeaturePartialMethod: // semantic check 681case MessageID.IDS_FeatureImplicitLocal: // Checked in the binder. 682case MessageID.IDS_FeatureAutoImplementedProperties: 686case MessageID.IDS_FeatureGenerics: // Also affects crefs. 687case MessageID.IDS_FeatureAnonDelegates: // semantic check 688case MessageID.IDS_FeatureGlobalNamespace: // Also affects crefs. 689case MessageID.IDS_FeatureFixedBuffer: // semantic check 690case MessageID.IDS_FeatureStaticClasses: // semantic check 691case MessageID.IDS_FeaturePartialTypes: // semantic check 692case MessageID.IDS_FeaturePropertyAccessorMods: 693case MessageID.IDS_FeatureExternAlias: // semantic check 694case MessageID.IDS_FeatureIterators: // semantic check 695case MessageID.IDS_FeatureDefault: // semantic check 696case MessageID.IDS_FeatureNullable: 697case MessageID.IDS_FeaturePragma: // Checked in the directive parser. 698case MessageID.IDS_FeatureSwitchOnBool: // Checked in the binder. 702case MessageID.IDS_FeatureModuleAttrLoc:
FlowAnalysis\AbstractFlowPass_Switch.cs (1)
96if (compilation.LanguageVersion >= MessageID.IDS_FeatureRecursivePatterns.RequiredVersion())
FlowAnalysis\DefiniteAssignment.cs (7)
487if (compilation.IsFeatureEnabled(MessageID.IDS_FeatureAutoDefaultStructs)) 500new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureAutoDefaultStructs.RequiredVersion())); 512if (!compilation.IsFeatureEnabled(MessageID.IDS_FeatureAutoDefaultStructs)) 1293if (compilation.IsFeatureEnabled(MessageID.IDS_FeatureAutoDefaultStructs)) 1302new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureAutoDefaultStructs.RequiredVersion())); 1345else if (compilation.IsFeatureEnabled(MessageID.IDS_FeatureAutoDefaultStructs)) 1358new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureAutoDefaultStructs.RequiredVersion()));
FlowAnalysis\NullableWalker.cs (3)
897|| compilation.IsFeatureEnabled(MessageID.IDS_FeatureAutoDefaultStructs))) 1686return compilation.LanguageVersion >= MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion(); 2425var requiredVersion = MessageID.IDS_FeatureDefaultTypeParameterConstraint.RequiredVersion();
LanguageVersion.cs (4)
558return self < MessageID.IDS_FeatureInferredTupleNames.RequiredVersion(); 563return self >= MessageID.IDS_FeatureNonTrailingNamedArguments.RequiredVersion(); 568return self >= MessageID.IDS_FeatureAttributesOnBackingFields.RequiredVersion(); 573return self >= MessageID.IDS_FeatureImprovedOverloadCandidates.RequiredVersion();
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
580if (_factory.Compilation.LanguageVersion >= MessageID.IDS_FeatureCacheStaticMethodGroupConversion.RequiredVersion()
Parser\DirectiveParser.cs (2)
532token = CheckFeatureAvailability(token, MessageID.IDS_FeatureNullableReferenceTypes); 560pragma = CheckFeatureAvailability(pragma, MessageID.IDS_FeaturePragma);
Parser\DocumentationCommentParser.cs (4)
1035operatorToken = CheckFeatureAvailability(operatorToken, MessageID.IDS_FeatureUnsignedRightShift, forceWarning: true); 1117checkedKeyword = CheckFeatureAvailability(checkedKeyword, MessageID.IDS_FeatureCheckedUserDefinedOperators, forceWarning: true); 1326open = CheckFeatureAvailability(open, MessageID.IDS_FeatureGenerics, forceWarning: true); 1390alias = CheckFeatureAvailability(alias, MessageID.IDS_FeatureGlobalNamespace, forceWarning: true);
Parser\LanguageParser.cs (9)
1433if ((!IsFeatureEnabled(MessageID.IDS_FeatureFileTypes) || forTopLevelStatements) && !ShouldContextualKeywordBeTreatedAsModifier(parsingStatementNotDeclaration: false)) 1456if ((!IsFeatureEnabled(MessageID.IDS_FeatureRequiredMembers) || forTopLevelStatements) && !ShouldContextualKeywordBeTreatedAsModifier(parsingStatementNotDeclaration: false)) 1487return IsFeatureEnabled(MessageID.IDS_FeatureRecords); 1630return IsFeatureEnabled(MessageID.IDS_FeatureRecords); 2391return IsFeatureEnabled(MessageID.IDS_FeatureRecords); 4489IsFeatureEnabled(MessageID.IDS_FeatureExpressionBodiedAccessor) 5772IsFeatureEnabled(MessageID.IDS_FeatureFieldKeyword); 6223open = CheckFeatureAvailability(open, MessageID.IDS_FeatureGenerics); 8679IsFeatureEnabled(MessageID.IDS_FeatureExpressionBodiedAccessor)
Parser\Lexer.cs (4)
796private void CheckFeatureAvailability(MessageID feature) 888CheckFeatureAvailability(MessageID.IDS_FeatureBinaryLiteral); 1044CheckFeatureAvailability(MessageID.IDS_FeatureLeadingDigitSeparator); 1048CheckFeatureAvailability(MessageID.IDS_FeatureDigitSeparator);
Parser\Lexer_StringLiteral.cs (1)
155var info = MessageID.IDS_FeatureStringEscapeCharacter.GetFeatureAvailabilityDiagnosticInfo(this.Options);
Parser\SyntaxParser.cs (2)
1139protected TNode CheckFeatureAvailability<TNode>(TNode node, MessageID feature, bool forceWarning = false) 1157protected bool IsFeatureEnabled(MessageID feature)
Symbols\AliasSymbol.cs (4)
377MessageID.IDS_FeatureUsingTypeAlias.CheckFeatureAvailability(diagnostics, usingDirective.UnsafeKeyword); 381MessageID.IDS_FeatureUsingTypeAlias.CheckFeatureAvailability(diagnostics, usingDirective.NamespaceOrType); 396if (!DeclaringCompilation.IsFeatureEnabled(MessageID.IDS_FeatureUsingTypeAlias)) 420MessageID.IDS_FeatureUsingTypeAlias.CheckFeatureAvailability(diagnostics, usingDirective.NamespaceOrType);
Symbols\ConstantValueUtils.cs (1)
158Binder.CheckFeatureAvailability(node.Syntax, MessageID.IDS_FeatureConstantInterpolatedStrings, diagnostics);
Symbols\ConstraintsHelper.cs (5)
102Binder.CheckFeatureAvailability(location.SourceTree, MessageID.IDS_FeatureAllowsRefStructConstraint, diagnostics, location); 495bool includeNullability = compilation.IsFeatureEnabled(MessageID.IDS_FeatureNullableReferenceTypes); 534this(currentCompilation, conversions, currentCompilation.IsFeatureEnabled(MessageID.IDS_FeatureNullableReferenceTypes), location, diagnostics) 948if (MessageID.IDS_FeatureAllowsRefStructConstraint.GetFeatureAvailabilityDiagnosticInfo(args.CurrentCompilation) is { } diagnosticInfo) 1005var csDiagnosticInfo = MessageID.IDS_FeatureUnmanagedConstructedTypes.GetFeatureAvailabilityDiagnosticInfo(args.CurrentCompilation);
Symbols\FunctionTypeSymbol.cs (1)
47return syntax.IsFeatureEnabled(MessageID.IDS_FeatureInferredDelegateType) ?
Symbols\Source\LambdaSymbol.cs (2)
19private readonly MessageID _messageID; 73public MessageID MessageID { get { return _messageID; } }
Symbols\Source\LocalFunctionSymbol.cs (1)
398var diagnosticInfo = MessageID.IDS_FeatureLocalFunctionAttributes.GetFeatureAvailabilityDiagnosticInfo((CSharpParseOptions)syntaxReferenceOpt.SyntaxTree.Options);
Symbols\Source\ModifierUtils.cs (14)
30modifierErrors |= !MessageID.IDS_FeatureReadOnlyMembers.CheckFeatureAvailability(diagnostics, readonlyToken); 107checkFeature(DeclarationModifiers.PrivateProtected, MessageID.IDS_FeaturePrivateProtected) | 108checkFeature(DeclarationModifiers.Required, MessageID.IDS_FeatureRequiredMembers) | 109checkFeature(DeclarationModifiers.File, MessageID.IDS_FeatureFileTypes) | 110checkFeature(DeclarationModifiers.Async, MessageID.IDS_FeatureAsync); 114bool checkFeature(DeclarationModifiers modifier, MessageID featureID) 122if (MessageID.IDS_FeatureRefFields.GetFeatureAvailabilityDiagnosticInfo((CSharpParseOptions)syntax.SyntaxTree.Options) is { } diagnosticInfo) 167requiredVersion = MessageID.IDS_FeatureStaticAbstractMembersInInterfaces.RequiredVersion(); 180Binder.CheckFeatureAvailability(errorLocation.SourceTree, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, errorLocation); 185requiredVersion = MessageID.IDS_DefaultInterfaceImplementation.RequiredVersion(); 218LanguageVersion requiredVersion = MessageID.IDS_FeatureStaticAbstractMembersInInterfaces.RequiredVersion(); 403var messageId = isForTypeDeclaration ? MessageID.IDS_FeaturePartialTypes : MessageID.IDS_FeaturePartialMethod;
Symbols\Source\ParameterHelpers.cs (8)
212bool allowShadowingNames = withTypeParametersBinder.Compilation.IsFeatureEnabled(MessageID.IDS_FeatureNameShadowingInNestedFunctions) && 442Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureExtensionMethod, diagnostics); 446Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 474Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 558MessageID.IDS_FeatureLambdaParamsArray.CheckFeatureAvailability(diagnostics, modifier); 563Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureReadOnlyReferences, diagnostics); 567Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefExtensionMethods, diagnostics); 613Binder.CheckFeatureAvailability(modifier, MessageID.IDS_FeatureRefReadonlyParameters, diagnostics);
Symbols\Source\SourceComplexParameterSymbol.cs (2)
377MessageID.IDS_FeatureOptionalParameter.CheckFeatureAvailability(diagnostics, defaultSyntax.EqualsToken); 1661MessageID.IDS_FeatureParamsCollections.CheckFeatureAvailability(diagnostics, ParameterSyntax);
Symbols\Source\SourceCustomEventSymbol.cs (1)
151Binder.CheckFeatureAvailability(syntax, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, this.GetFirstLocation());
Symbols\Source\SourceMemberContainerSymbol.cs (15)
498if (reportIfContextual(SyntaxKind.RecordKeyword, MessageID.IDS_FeatureRecords, ErrorCode.WRN_RecordNamedDisallowed) 499|| reportIfContextual(SyntaxKind.RequiredKeyword, MessageID.IDS_FeatureRequiredMembers, ErrorCode.ERR_RequiredNameDisallowed) 500|| reportIfContextual(SyntaxKind.FileKeyword, MessageID.IDS_FeatureFileTypes, ErrorCode.ERR_FileTypeNameDisallowed) 501|| reportIfContextual(SyntaxKind.ScopedKeyword, MessageID.IDS_FeatureRefFields, ErrorCode.ERR_ScopedTypeNameDisallowed)) 510bool reportIfContextual(SyntaxKind contextualKind, MessageID featureId, ErrorCode error) 1362Binder.CheckFeatureAvailability(t.DeclaringSyntaxReferences[0].GetSyntax(), MessageID.IDS_DefaultInterfaceImplementation, diagnostics, t.GetFirstLocation()); 2160var methodKind = method1.MethodKind == MethodKind.Constructor ? MessageID.IDS_SK_CONSTRUCTOR : MessageID.IDS_SK_METHOD; 4125MessageID.IDS_FeatureParameterlessStructConstructors.CheckFeatureAvailability(diagnostics, m.DeclaringCompilation, location); 4154MessageID.IDS_FeatureStructFieldInitializers.CheckFeatureAvailability(diagnostics, symbol.DeclaringCompilation, symbol.GetFirstLocation()); 4472if (baseToStringMethod.ContainingModule != this.ContainingModule && !this.DeclaringCompilation.IsFeatureEnabled(MessageID.IDS_FeatureSealedToStringInRecord)) 4475var requiredVersion = MessageID.IDS_FeatureSealedToStringInRecord.RequiredVersion(); 4498MessageID.IDS_FeatureSealedToStringInRecord.CheckFeatureAvailability( 4562Binder.CheckFeatureAvailability(syntax, MessageID.IDS_FeaturePositionalFieldsInRecords, diagnostics);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (4)
1004else if (MessageID.IDS_FeatureCovariantReturnsForOverrides.GetFeatureAvailabilityDiagnosticInfo(this.DeclaringCompilation) is { } diagnosticInfo) 1076var diagnosticInfo = MessageID.IDS_FeatureCovariantReturnsForOverrides.GetFeatureAvailabilityDiagnosticInfo(this.DeclaringCompilation); 1201DeclaringCompilation.LanguageVersion >= MessageID.IDS_FeatureCovariantReturnsForOverrides.RequiredVersion()) 1527compilation.IsFeatureEnabled(MessageID.IDS_FeatureNullableReferenceTypes);
Symbols\Source\SourceMemberFieldSymbol.cs (3)
199MessageID.IDS_FeatureFixedBuffer.CheckFeatureAvailability(diagnostics, modifier); 363Binder.CheckFeatureAvailability(declarator, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, ErrorLocation); 493MessageID.IDS_FeatureRefFields.CheckFeatureAvailability(diagnostics, compilation, typeSyntax.SkipScoped(out _).Location);
Symbols\Source\SourceMemberMethodSymbol.cs (1)
1101Binder.CheckFeatureAvailability(declarationSyntax, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, location);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (9)
598MessageID.IDS_FeatureMemberNotNull.CheckFeatureAvailability(diagnostics, arguments.AttributeSyntaxOpt); 603MessageID.IDS_FeatureMemberNotNull.CheckFeatureAvailability(diagnostics, arguments.AttributeSyntaxOpt); 608MessageID.IDS_FeatureModuleInitializers.CheckFeatureAvailability(diagnostics, arguments.AttributeSyntaxOpt); 628MessageID.IDS_FeatureRefStructInterfaces.CheckFeatureAvailability(diagnostics, arguments.AttributeSyntaxOpt); 642MessageID.IDS_FeatureOverloadResolutionPriority.CheckFeatureAvailability(diagnostics, arguments.AttributeSyntaxOpt); 704MessageID.IDS_FeatureObsoleteOnPropertyAccessor.CheckFeatureAvailability(diagnostics, arguments.AttributeSyntaxOpt); 1425diagnostics.Add(ErrorCode.ERR_CannotUseManagedTypeInUnmanagedCallersOnly, syntax.Location, type, (isParam ? MessageID.IDS_Parameter : MessageID.IDS_Return).Localize()); 1552MessageID.IDS_AsyncMethodBuilderOverride.CheckFeatureAvailability(diagnostics, this.DeclaringCompilation, errorLocation);
Symbols\Source\SourceModuleSymbol.cs (1)
698bool value = compilation.IsFeatureEnabled(MessageID.IDS_FeatureRefFields) || _assemblySymbol.RuntimeSupportsByRefFields;
Symbols\Source\SourceNamedTypeSymbol.cs (2)
177MessageID.IDS_FeatureGenerics.CheckFeatureAvailability(diagnostics, tpl.LessThanToken); 193MessageID.IDS_FeatureTypeVariance.CheckFeatureAvailability(diagnostics, tp.VarianceKeyword);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (2)
109MessageID.IDS_FeatureGenericAttributes.CheckFeatureAvailability(diagnostics, this.DeclaringCompilation, baseLocation); 572Binder.CheckFeatureAvailability(typeSyntax, MessageID.IDS_FeatureRefStructInterfaces, diagnostics);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (3)
745MessageID.IDS_FeatureUsingTypeAlias.CheckFeatureAvailability(diagnostics, usingDirective, unsafeKeywordLocation); 757if (!compilation.IsFeatureEnabled(MessageID.IDS_FeatureUsingTypeAlias)) 835MessageID.IDS_SK_TYPE_OR_NAMESPACE.Localize());
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
167syntax.ConstraintClauses[0].WhereKeyword, MessageID.IDS_OverrideWithConstraints, diagnostics); 804Binder.CheckFeatureAvailability(SyntaxNode, MessageID.IDS_FeatureExtendedPartialMethods, diagnostics, location); 1100MessageID.IDS_FeatureGenerics.CheckFeatureAvailability(diagnostics, syntax.TypeParameterList.LessThanToken);
Symbols\Source\SourcePropertyAccessorSymbol.cs (3)
201Binder.CheckFeatureAvailability(syntax, MessageID.IDS_FeatureInitOnlySetters, diagnostics, location); 219MessageID.IDS_FeaturePropertyAccessorMods.CheckFeatureAvailability(diagnostics, modifiers[0]); 465if (!options.IsFeatureEnabled(MessageID.IDS_FeatureReadOnlyMembers))
Symbols\Source\SourcePropertySymbol.cs (7)
52((CSharpParseOptions)syntax.SyntaxTree.Options).IsFeatureEnabled(MessageID.IDS_FeatureFieldKeyword)); 150(hasAutoPropertyGet && hasAutoPropertySet ? MessageID.IDS_FeatureAutoImplementedProperties : MessageID.IDS_FeatureFieldKeyword) : 151(hasAutoPropertyGet ? MessageID.IDS_FeatureReadonlyAutoImplementedProperties : MessageID.IDS_FeatureAutoImplementedProperties), 163MessageID.IDS_FeatureAutoPropertyInitializer.CheckFeatureAvailability(diagnostics, initializer.EqualsToken); 453LanguageVersion requiredVersion = MessageID.IDS_FeaturePartialProperties.RequiredVersion();
Symbols\Source\SourcePropertySymbolBase.cs (5)
319if (!property.DeclaringCompilation.IsFeatureEnabled(MessageID.IDS_FeatureFieldKeyword)) 1561MessageID.IDS_FeatureMemberNotNull.CheckFeatureAvailability(diagnostics, arguments.AttributeSyntaxOpt); 1566MessageID.IDS_FeatureMemberNotNull.CheckFeatureAvailability(diagnostics, arguments.AttributeSyntaxOpt); 1582MessageID.IDS_FeatureRefStructInterfaces.CheckFeatureAvailability(diagnostics, arguments.AttributeSyntaxOpt); 1592MessageID.IDS_FeatureOverloadResolutionPriority.CheckFeatureAvailability(diagnostics, arguments.AttributeSyntaxOpt);
Symbols\Source\SourceUserDefinedConversionSymbol.cs (2)
30MessageID.IDS_FeatureCheckedUserDefinedOperators.CheckFeatureAvailability(diagnostics, syntax.CheckedKeyword); 90MessageID.IDS_FeatureStaticAbstractMembersInInterfaces.CheckFeatureAvailability(diagnostics, syntax.ExplicitInterfaceSpecifier);
Symbols\Source\SourceUserDefinedOperatorSymbol.cs (3)
30MessageID.IDS_FeatureCheckedUserDefinedOperators.CheckFeatureAvailability(diagnostics, syntax.CheckedKeyword); 39MessageID.IDS_FeatureUnsignedRightShift.CheckFeatureAvailability(diagnostics, syntax.OperatorToken); 90MessageID.IDS_FeatureStaticAbstractMembersInInterfaces.CheckFeatureAvailability(diagnostics, syntax.ExplicitInterfaceSpecifier);
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (3)
170LanguageVersion requiredVersion = MessageID.IDS_FeatureStaticAbstractMembersInInterfaces.RequiredVersion(); 193Binder.CheckFeatureAvailability(location.SourceTree, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, location); 730Binder.CheckFeatureAvailability(location.SourceTree, MessageID.IDS_FeatureRelaxedShiftOperator, diagnostics, location);
Symbols\Symbol_Attributes.cs (2)
344MessageID.IDS_FeatureGenericAttributes.CheckFeatureAvailability(diagnostics, attributesToBind[i]); 698diagnostics.Add(ErrorCode.WRN_NonECMAFeature, targetOpt.GetLocation(), MessageID.IDS_FeatureModuleAttrLoc);
Symbols\SymbolKindExtensions.cs (15)
21return MessageID.IDS_SK_NAMESPACE.Localize(); 23return MessageID.IDS_SK_TYPE.Localize(); 25return MessageID.IDS_SK_TYVAR.Localize(); 27return MessageID.IDS_SK_ARRAY.Localize(); 29return MessageID.IDS_SK_POINTER.Localize(); 31return MessageID.IDS_SK_FUNCTION_POINTER.Localize(); 33return MessageID.IDS_SK_DYNAMIC.Localize(); 35return MessageID.IDS_SK_METHOD.Localize(); 37return MessageID.IDS_SK_PROPERTY.Localize(); 39return MessageID.IDS_SK_EVENT.Localize(); 41return MessageID.IDS_SK_FIELD.Localize(); 45return MessageID.IDS_SK_VARIABLE.Localize(); 47return MessageID.IDS_SK_ALIAS.Localize(); 49return MessageID.IDS_SK_LABEL.Localize(); 53return MessageID.IDS_SK_UNKNOWN.Localize();
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
177MessageID.IDS_FeaturePrimaryConstructors.CheckFeatureAvailability(diagnostics, attributeDeclarationSyntax, attributeDeclarationSyntax.Target.Identifier.GetLocation());
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
181new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureAttributesOnBackingFields.RequiredVersion())),
Symbols\Tuples\TupleFieldSymbol.cs (1)
284new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureInferredTupleNames.RequiredVersion())));
Symbols\TypeSymbol.cs (7)
1015LanguageVersion requiredVersion = MessageID.IDS_FeatureImplicitImplementationOfNonPublicMembers.RequiredVersion(); 1637var feature = isStatic ? MessageID.IDS_FeatureStaticAbstractMembersInInterfaces : MessageID.IDS_DefaultInterfaceImplementation; 1740LanguageVersion requiredVersion = MessageID.IDS_FeatureStaticAbstractMembersInInterfaces.RequiredVersion(); 1747MessageID.IDS_FeatureStaticAbstractMembersInInterfaces.Localize(), 1969MessageID.IDS_FeatureRefStructInterfaces.CheckFeatureAvailability(diagnostics, implementingSymbol.DeclaringCompilation, applicationSyntaxReference.GetLocation());
Symbols\VarianceSafety.cs (9)
176return MessageID.IDS_FeatureVarianceSafetyForStaticInterfaceMembers.RequiredVersion() <= member.DeclaringCompilation.LanguageVersion; 311diagnostics.AddVarianceError(typeParam, context, locationProvider, locationArg, MessageID.IDS_Invariantly); 317diagnostics.AddVarianceError(typeParam, context, locationProvider, locationArg, MessageID.IDS_Covariantly); 323diagnostics.AddVarianceError(typeParam, context, locationProvider, locationArg, MessageID.IDS_Contravariantly); 445MessageID expectedVariance) 448MessageID actualVariance; 452actualVariance = MessageID.IDS_Contravariant; 455actualVariance = MessageID.IDS_Covariant; 475new CSharpRequiredLanguageVersion(MessageID.IDS_FeatureVarianceSafetyForStaticInterfaceMembers.RequiredVersion()));
Syntax\SyntaxNodeExtensions.cs (3)
274MessageID.IDS_FeatureRefLocalsReturns.CheckFeatureAvailability(diagnostics, refType.RefKeyword); 277MessageID.IDS_FeatureReadOnlyReferences.CheckFeatureAvailability(diagnostics, refType.ReadOnlyKeyword); 328MessageID.IDS_FeatureRefLocalsReturns.CheckFeatureAvailability(diagnostics, refExpression.RefKeyword);