141 references to Diagnostic
Microsoft.AspNetCore.Razor.Language.UnitTests (141)
IntegrationTests\ComponentCodeGenerationTestBase.cs (76)
918
Diagnostic
(ErrorCode.ERR_BadArgType, @"""very-cool""").WithArguments("1", "string", "int").WithLocation(1, 28));
1169
Diagnostic
("RZ2012").WithLocation(1, 1));
1202
Diagnostic
("RZ2012").WithLocation(1, 1),
1204
Diagnostic
("RZ2012").WithLocation(1, 1));
1223
Diagnostic
("RZ2012").WithLocation(1, 1));
1365
Diagnostic
("RZ2012").WithLocation(1, 1));
1514
Diagnostic
("RZ2012").WithLocation(1, 1));
1545
Diagnostic
("RZ10016").WithLocation(1, 61));
2247
Diagnostic
(ErrorCode.ERR_ObjectRequired, "global::Test.MyComponent.\r\n#nullable restore\r\n#line (1,14)-(1,19) \"x:\\dir\\subdir\\Test\\TestComponent.cshtml\"\r\nValue").WithArguments("Test.MyComponent.Value").WithLocation(21, 55)
2323
Diagnostic
(ErrorCode.ERR_InvalidExprTerm, ";").WithArguments(";").WithLocation(3, 7)
2327
Diagnostic
(ErrorCode.ERR_InvalidExprTerm, "").WithArguments(")").WithLocation(3, 2)
2467
Diagnostic
(ErrorCode.ERR_ObjectRequired, "global::Test.MyComponent.\r\n#nullable restore\r\n#line (1,20)-(1,25) \"x:\\dir\\subdir\\Test\\TestComponent.cshtml\"\r\nValue").WithArguments("Test.MyComponent.Value").WithLocation(21, 55),
2470
Diagnostic
(ErrorCode.ERR_ObjectRequired, "global::Test.MyComponent.ValueChanged").WithArguments("Test.MyComponent.ValueChanged").WithLocation(38, 55)
2621
Diagnostic
(ErrorCode.ERR_BadArgType, "ParentValue").WithArguments("1", "string", "int").WithLocation(1, 27),
2624
Diagnostic
(ErrorCode.ERR_NoImplicitConv, "__value").WithArguments("int", "string").WithLocation(37, 38)]
2627
Diagnostic
(ErrorCode.ERR_BadArgType, "ParentValue").WithArguments("1", "string", "int").WithLocation(1, 27),
2630
Diagnostic
(ErrorCode.ERR_NoImplicitConv, "__value").WithArguments("int", "string").WithLocation(38, 166)]);
2700
Diagnostic
(ErrorCode.ERR_BadArgType, "ParentValue").WithArguments("1", "string", "int").WithLocation(1, 27),
2703
Diagnostic
(ErrorCode.ERR_BadArgType, "global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)").WithArguments("2", "Microsoft.AspNetCore.Components.EventCallback<string>", "Microsoft.AspNetCore.Components.EventCallback").WithLocation(37, 13)]
2706
Diagnostic
(ErrorCode.ERR_BadArgType, "ParentValue").WithArguments("1", "string", "int").WithLocation(1, 27),
2709
Diagnostic
(ErrorCode.ERR_BadArgType, "global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.CreateInferredEventCallback(this, __value => ParentValue = __value, ParentValue)").WithArguments("2", "Microsoft.AspNetCore.Components.EventCallback<string>", "Microsoft.AspNetCore.Components.EventCallback").WithLocation(38, 351)
2910
Diagnostic
(ErrorCode.ERR_NoImplicitConv, "ParentValue").WithArguments("int", "string").WithLocation(38, 195),
2913
Diagnostic
(ErrorCode.ERR_CantConvAnonMethReturns, "ParentValue").WithArguments("lambda expression").WithLocation(38, 195)]
2916
Diagnostic
(ErrorCode.ERR_NoImplicitConv, "ParentValue").WithArguments("int", "string").WithLocation(39, 274),
2919
Diagnostic
(ErrorCode.ERR_CantConvAnonMethReturns, "ParentValue").WithArguments("lambda expression").WithLocation(39, 274)
3902
Diagnostic
(ErrorCode.ERR_BadArgType, "UpdateValue").WithArguments("1", "Microsoft.AspNetCore.Components.EventCallback", "System.Action").WithLocation(1, 63));
4286
Diagnostic
(ErrorCode.ERR_RetNoObjectRequiredLambda, "return").WithLocation(1, 94));
5944
Diagnostic
(ErrorCode.WRN_NullReferenceReceiver, "_field").WithLocation(4, 7)
5947
Diagnostic
(ErrorCode.WRN_NullReferenceReceiver, "_field").WithLocation(4, 3));
5974
Diagnostic
(ErrorCode.WRN_MissingNonNullTypesContextForAnnotationInGeneratedCode, "?").WithLocation(1, 31));
5984
Diagnostic
(ErrorCode.WRN_MissingNonNullTypesContextForAnnotationInGeneratedCode, "?").WithLocation(1, 21),
5987
Diagnostic
(ErrorCode.WRN_MissingNonNullTypesContextForAnnotationInGeneratedCode, "?").WithLocation(14, 62)
5992
Diagnostic
(ErrorCode.WRN_MissingNonNullTypesContextForAnnotationInGeneratedCode, "?").WithLocation(1, 31)
6554
Diagnostic
(ErrorCode.ERR_BadArgType, "Increment").WithArguments("2", "method group", "Microsoft.AspNetCore.Components.EventCallback").WithLocation(2, 24));
6593
Diagnostic
(ErrorCode.WRN_UnreferencedField, "counter").WithArguments("Test.TestComponent.counter").WithLocation(4, 17));
6635
Diagnostic
(ErrorCode.WRN_UnreferencedField, "counter").WithArguments("Test.TestComponent.counter").WithLocation(4, 17));
9289
Diagnostic
("RZ10001").WithLocation(2, 1));
9534
Diagnostic
(ErrorCode.WRN_InvalidAttributeLocation, "x").WithArguments("x", "typevar").WithLocation(9, 23)
10093
Diagnostic
(ErrorCode.WRN_UnreferencedFieldAssg, "comp").WithArguments("X.TestComponent.comp"),
10846
Diagnostic
(ErrorCode.ERR_SingleTypeNameNotFound, "ComponentBase").WithArguments("ComponentBase").WithLocation(4, 31),
10849
Diagnostic
(ErrorCode.ERR_SingleTypeNameNotFound, "ILayoutComponent").WithArguments("ILayoutComponent").WithLocation(4, 46),
10852
Diagnostic
(ErrorCode.ERR_SingleTypeNameNotFound, "RenderFragment").WithArguments("RenderFragment").WithLocation(6, 16)]);
10860
Diagnostic
(ErrorCode.ERR_SingleTypeNameNotFound, "ComponentBase").WithArguments("ComponentBase").WithLocation(4, 31),
10863
Diagnostic
(ErrorCode.ERR_SingleTypeNameNotFound, "ILayoutComponent").WithArguments("ILayoutComponent").WithLocation(4, 46),
10866
Diagnostic
(ErrorCode.ERR_SingleTypeNameNotFound, "RenderFragment").WithArguments("RenderFragment").WithLocation(6, 16),
10869
Diagnostic
(ErrorCode.ERR_NameNotInContext, "Foo").WithArguments("Foo").WithLocation(5, 7)]
10872
Diagnostic
(ErrorCode.ERR_SingleTypeNameNotFound, "ComponentBase").WithArguments("ComponentBase").WithLocation(4, 31),
10875
Diagnostic
(ErrorCode.ERR_SingleTypeNameNotFound, "ILayoutComponent").WithArguments("ILayoutComponent").WithLocation(4, 46),
10878
Diagnostic
(ErrorCode.ERR_SingleTypeNameNotFound, "RenderFragment").WithArguments("RenderFragment").WithLocation(6, 16),
10881
Diagnostic
(ErrorCode.ERR_NameNotInContext, "Foo").WithArguments("Foo").WithLocation(5, 2),
10884
Diagnostic
(ErrorCode.ERR_NameNotInContext, "__builder").WithArguments("__builder").WithLocation(5, 2)]);
11733
Diagnostic
(ErrorCode.ERR_BadSKunknown, "MyEnum").WithArguments("Test.TestComponent.MyEnum", "type").WithLocation(1, 31));
11772
Diagnostic
(ErrorCode.ERR_BadSKunknown, "MyEnum").WithArguments("Test.TestComponent.MyEnum", "type").WithLocation(1, 31));
11807
Diagnostic
(ErrorCode.ERR_SyntaxError, "").WithArguments(",").WithLocation(1, 32),
11810
Diagnostic
(ErrorCode.ERR_BadArgCount, "TypeCheck<global::System.String>").WithArguments("TypeCheck", "2").WithLocation(27, 91)]
11813
Diagnostic
(ErrorCode.ERR_SyntaxError, "").WithArguments(",").WithLocation(1, 32),
11816
Diagnostic
(ErrorCode.ERR_BadArgCount, "TypeCheck<global::System.String>").WithArguments("TypeCheck", "2").WithLocation(29, 88)]
11978
Diagnostic
(ErrorCode.ERR_NameNotInContext, "@Html").WithArguments("Html").WithLocation(1, 28));
12069
Diagnostic
(ErrorCode.ERR_InvalidExprTerm, "<").WithArguments("<").WithLocation(13, 67),
12072
Diagnostic
(ErrorCode.ERR_IllegalStatement, """
12078
Diagnostic
(ErrorCode.ERR_NameNotInContext, "p").WithArguments("p").WithLocation(13, 68),
12081
Diagnostic
(ErrorCode.ERR_InvalidExprTerm, "/").WithArguments("/").WithLocation(13, 79),
12084
Diagnostic
(ErrorCode.ERR_NameNotInContext, "p").WithArguments("p").WithLocation(13, 80),
12087
Diagnostic
(ErrorCode.ERR_NameNotInContext, "Parameter").WithArguments("Parameter").WithLocation(14, 4),
12090
Diagnostic
(ErrorCode.ERR_SemicolonExpected, "").WithLocation(14, 14)]
12177
Diagnostic
(ErrorCode.ERR_BadArity, "TestComponent").WithArguments("Test.TestComponent<T>", "type", "1").WithLocation(17, 19));
12185
Diagnostic
(ErrorCode.ERR_BadArity, "TestComponent").WithArguments("Test.TestComponent<T>", "type", "1").WithLocation(13, 19));
12489
?
Diagnostic
(ErrorCode.WRN_NullReferenceReceiver, "Container").WithLocation(10, 29)
12492
:
Diagnostic
(ErrorCode.WRN_NullReferenceReceiver, "Container").WithLocation(10, 31)
12548
Diagnostic
(ErrorCode.ERR_BadArgType, "x").WithArguments("1", "int", "string").WithLocation(2, 55));
12570
Diagnostic
(ErrorCode.ERR_BadArgType, "x").WithArguments("1", "int", "string").WithLocation(2, 74)
12609
Diagnostic
(ErrorCode.ERR_NameNotInContext, "x").WithArguments("x").WithLocation(2, 55));
12627
Diagnostic
(ErrorCode.ERR_NoCorrespondingArgument, "TypeCheck<string>").WithArguments("value", "Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<T>(T)").WithLocation(41, 85)]
12630
Diagnostic
(ErrorCode.ERR_NoCorrespondingArgument, "TypeCheck<string>").WithArguments("value", "Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<T>(T)").WithLocation(37, 105)]
13052
? [
Diagnostic
(ErrorCode.ERR_NameNotInContext, "section").WithArguments("section").WithLocation(1, 7)]
13054
: [
Diagnostic
(ErrorCode.ERR_NameNotInContext, "section").WithArguments("section").WithLocation(1, 2)]);
IntegrationTests\ComponentDeclarationIntegrationTest.cs (1)
146
Diagnostic
(ErrorCode.ERR_SingleTypeNameNotFound, "StringBuilder").WithArguments("StringBuilder").WithLocation(2, 12));
IntegrationTests\ComponentPreprocessorDirectiveTest.cs (54)
114
Diagnostic
(ErrorCode.ERR_PPDefFollowsToken, "define").WithLocation(2, 2),
117
Diagnostic
(ErrorCode.ERR_PPDefFollowsToken, "undef").WithLocation(3, 2)
140
Diagnostic
(ErrorCode.ERR_UnexpectedDirective, "#endif").WithLocation(7, 1));
156
Diagnostic
(ErrorCode.ERR_EndOfPPLineExpected, "}").WithLocation(1, 13),
159
Diagnostic
(ErrorCode.ERR_EndOfPPLineExpected, "}").WithLocation(2, 11));
179
Diagnostic
(ErrorCode.ERR_BadDirectivePlacement, "#").WithLocation(2, 12),
182
Diagnostic
(ErrorCode.ERR_BadDirectivePlacement, "#").WithLocation(5, 12));
203
Diagnostic
(ErrorCode.ERR_BadDirectivePlacement, "#").WithLocation(3, 12),
206
Diagnostic
(ErrorCode.ERR_BadDirectivePlacement, "#").WithLocation(6, 12));
226
Diagnostic
(ErrorCode.ERR_BadDirectivePlacement, "#").WithLocation(2, 9),
229
Diagnostic
(ErrorCode.ERR_VariableUsedBeforeDeclaration, "x").WithArguments("x").WithLocation(5, 1),
232
Diagnostic
(ErrorCode.ERR_SemicolonExpected, "").WithLocation(5, 2),
235
Diagnostic
(ErrorCode.ERR_BadDirectivePlacement, "#").WithLocation(5, 3));
377
Diagnostic
(ErrorCode.WRN_UnreferencedVarAssg, "x").WithArguments("x").WithLocation(2, 9)
399
Diagnostic
(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(14, 1),
402
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10),
405
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10),
408
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10)
416
Diagnostic
(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(15, 1),
419
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10),
422
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10),
425
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10)
449
Diagnostic
(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(14, 1),
452
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10),
455
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10),
458
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10)
465
Diagnostic
(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(15, 1),
468
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10),
471
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10),
474
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10)
500
Diagnostic
(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(16, 1),
503
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10),
506
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10),
509
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10)
516
Diagnostic
(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(17, 1),
519
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10),
522
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10),
525
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10)
551
Diagnostic
(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(16, 1),
554
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10),
557
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10),
560
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10)
567
Diagnostic
(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(17, 1),
570
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10),
573
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10),
576
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10)
602
Diagnostic
(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(16, 1),
605
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10),
608
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10),
611
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(26, 10)
618
Diagnostic
(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(17, 1),
621
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10),
624
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10),
627
Diagnostic
(ErrorCode.ERR_RbraceExpected, "").WithLocation(19, 10)
IntegrationTests\ComponentRenderModeDirectiveIntegrationTests.cs (9)
56
Diagnostic
(ErrorCode.ERR_BadArity, "TestComponent").WithArguments("Test.TestComponent<T>", "type", "1").WithLocation(13, 19));
74
Diagnostic
(ErrorCode.ERR_BadArity, "TestComponent").WithArguments("Test.TestComponent<T>", "type", "1").WithLocation(13, 19),
77
Diagnostic
(ErrorCode.ERR_FeatureNotAvailableInVersion10, "global::Microsoft.AspNetCore.Components.RenderModeAttribute").WithArguments("generic attributes", "11.0").WithLocation(31, 70));
200
Diagnostic
(ErrorCode.ERR_NameNotInContext, "NoExist").WithArguments("NoExist").WithLocation(1, 13));
215
Diagnostic
(ErrorCode.ERR_NameNotInContext, "rendermode").WithArguments("rendermode").WithLocation(1, 2)
253
Diagnostic
(ErrorCode.ERR_NameNotInContext, "Foo").WithArguments("Foo").WithLocation(34, 101),
256
Diagnostic
(ErrorCode.WRN_UnreferencedFieldAssg, "rendermode").WithArguments("Test.TestComponent.rendermode").WithLocation(5, 12)
276
Diagnostic
(ErrorCode.ERR_ObjectRequired, "myRenderMode").WithArguments("Test.TestComponent.myRenderMode").WithLocation(1, 13));
524
Diagnostic
(ErrorCode.ERR_BadArity, "TestComponent").WithArguments("Test.TestComponent<T>", "type", "1").WithLocation(2, 15));
IntegrationTests\ComponentTypingTest.cs (1)
75
Diagnostic
(ErrorCode.ERR_DottedTypeNameNotFoundInNS, "ModelState").WithArguments("ModelState", "Test").WithLocation(3, 10));