40 references to Code
Microsoft.CodeAnalysis (2)
Diagnostic\DiagnosticInfo.cs (1)
438switch (Code)
Diagnostic\DiagnosticWithInfo.cs (1)
71get { return this.Info.Code; }
Microsoft.CodeAnalysis.CSharp (38)
Binder\Binder_Expressions.cs (2)
7450if ((ErrorCode)diagnostic.Code == ErrorCode.ERR_RequiredMembersInvalid) 11623if (diagnosticInfo.Code == (int)ErrorCode.ERR_InvalidDelegateType)
Binder\Binder_Operators.cs (1)
1097var code = diagnostic is DiagnosticWithInfo { HasLazyInfo: true, LazyInfo.Code: var lazyCode } ? lazyCode : diagnostic.Code;
Binder\Binder_Symbols.cs (3)
2369if (errorInfo != null && errorInfo.Code == (int)ErrorCode.ERR_CircularBase) 2731if (diagInfo.Code == (int)ErrorCode.ERR_CycleInTypeForwarder) 2736else if (diagInfo.Code == (int)ErrorCode.ERR_TypeForwardedToMultipleAssemblies)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
611(ErrorCode)diagInfo.Code,
Errors\CSDiagnosticInfo.cs (1)
58internal new ErrorCode Code => (ErrorCode)base.Code;
Errors\MessageProvider.cs (1)
125diagnosticInfo.Code,
Errors\SyntaxDiagnosticInfo.cs (1)
56return new SyntaxDiagnosticInfo(offset, this.Width, (ErrorCode)this.Code, this.Arguments);
Errors\XmlSyntaxDiagnosticInfo.cs (1)
40string messagePrefix = this.MessageProvider.LoadMessage(this.Code, culture);
Parser\DocumentationCommentParser.cs (2)
796SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(rawInfo.Offset, rawInfo.Width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code); 1041SyntaxDiagnosticInfo crefInfo = new SyntaxDiagnosticInfo(offset, width, ErrorCode.WRN_ErrorOverride, rawInfo, rawInfo.Code);
Parser\LanguageParser.cs (2)
1252literalToken.GetDiagnostics().Contains(d => d.Code == (int)ErrorCode.ERR_NewlineInConst)) 9329!semicolonToken.GetDiagnostics().Contains(diagnosticInfo => (ErrorCode)diagnosticInfo.Code == ErrorCode.ERR_SemicolonExpected))
Parser\Lexer.cs (1)
3982this.AddError(ErrorCode.WRN_ErrorOverride, info, info.Code);
Parser\SyntaxParser.cs (1)
1094new SyntaxDiagnosticInfo(finalDiagnosticOffset, diagnostic.Width, (ErrorCode)diagnostic.Code, diagnostic.Arguments));
Symbols\EventSymbol.cs (1)
322return (object?)info != null && info.Code is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\FieldSymbol.cs (1)
390return (object)info != null && info.Code is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
148if (fromSignature.DiagnosticInfo?.Code == (int)ErrorCode.ERR_BindToBogus && fromSignature.DiagnosticInfo.Arguments.AsSingleton() == (object)Signature)
Symbols\Metadata\PE\PEAssemblySymbol.cs (1)
334=> GetCompilerFeatureRequiredDiagnostic()?.Code == (int)ErrorCode.ERR_UnsupportedCompilerFeature || base.HasUnsupportedMetadata;
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
730=> GetCompilerFeatureRequiredDiagnostic()?.Code == (int)ErrorCode.ERR_UnsupportedCompilerFeature || base.HasUnsupportedMetadata;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2769if (useSiteInfo.DiagnosticInfo is { Code: (int)ErrorCode.ERR_UnsupportedCompilerFeature } diag)
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
1271return DeriveCompilerFeatureRequiredDiagnostic(decoder) is { Code: (int)ErrorCode.ERR_UnsupportedCompilerFeature } || base.HasUnsupportedMetadata;
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
738return DeriveCompilerFeatureRequiredDiagnostic(GetDecoder(containingModule)) is { Code: (int)ErrorCode.ERR_UnsupportedCompilerFeature } || base.HasUnsupportedMetadata;
Symbols\MethodSymbol.cs (1)
1099return (object)info != null && info.Code is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\ObsoleteAttributeHelpers.cs (1)
228return (ErrorCode)diagnosticInfo.Code is
Symbols\ParameterSymbol.cs (1)
463return info.DiagnosticInfo?.Code is (int)ErrorCode.ERR_BogusType or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\PropertySymbol.cs (1)
439return (object)info != null && info.Code is (int)ErrorCode.ERR_BindToBogus or (int)ErrorCode.ERR_UnsupportedCompilerFeature;
Symbols\Source\SourceAssemblySymbol.cs (1)
2220if (useSiteInfo.DiagnosticInfo?.Code != (int)ErrorCode.ERR_UnexpectedUnboundGenericName &&
Symbols\Symbol.cs (5)
1138if (info.Severity == DiagnosticSeverity.Error && IsHighestPriorityUseSiteErrorCode(info.Code)) 1195if (info.Code == (int)ErrorCode.WRN_UnifyReferenceBldRev || 1196info.Code == (int)ErrorCode.WRN_UnifyReferenceMajMin || 1197info.Code == (int)ErrorCode.ERR_AssemblyMatchBadVersion) 1217if (info.DiagnosticInfo?.Code == (int)ErrorCode.ERR_BogusType)
Symbols\TypeSymbol.cs (1)
529return (object)info != null && info.Code is (int)ErrorCode.ERR_UnsupportedCompilerFeature or (int)ErrorCode.ERR_BogusType;
Symbols\UnboundGenericType.cs (1)
120: Hash.Combine(_name, _errorInfo.Code);
Syntax\InternalSyntax\SyntaxFirstTokenReplacer.cs (1)
78(ErrorCode)oldSyntaxDiagnostic.Code,