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