18 references to ERR_ExtensionParameterDisallowsDefaultValue
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
2493
or ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
Symbols\Source\ParameterHelpers.cs (1)
934
diagnostics.Add(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, parameterSyntax.GetLocation());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (14)
Semantics\ExtensionTests.cs (10)
3398
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "int i = 0").WithLocation(3, 15));
3420
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "int i = 0").WithLocation(3, 15),
3439
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "int i = null").WithLocation(3, 15));
3455
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "ref readonly int x = 2").WithLocation(3, 15));
3471
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "[System.Runtime.InteropServices.DefaultParameterValue(1)] int o = 2").WithLocation(3, 15),
3531
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "[System.Runtime.CompilerServices.CallerLineNumber] int x = 2").WithLocation(3, 15));
5058
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "object o = null").WithLocation(3, 15)
5070
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "object o = null").WithLocation(3, 15),
35398
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "int i = 0").WithLocation(5, 15));
44699
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, @"[System.Runtime.CompilerServices.CallerMemberName] string name = """"").WithLocation(5, 15));
Semantics\ExtensionTests2.cs (4)
25402
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "int i = 42").WithLocation(3, 15));
28915
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "int i = 0").WithLocation(3, 15),
28918
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "int i = 1").WithLocation(4, 15));
34428
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, @"[System.Runtime.CompilerServices.CallerArgumentExpression(nameof(s))] string s = """"").WithLocation(3, 15),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Parsing\ExtensionsParsingTests.cs (2)
881
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "object x = null").WithLocation(3, 15));
940
Diagnostic(ErrorCode.
ERR_ExtensionParameterDisallowsDefaultValue
, "object = null").WithLocation(3, 15));