diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs index 1c2995cf3f43c..db5435b9d86e3 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/LibraryImportGenerator.cs @@ -274,7 +274,6 @@ private static IncrementalStubGenerationContext CalculateStubInformation( if (libraryImportData is null) { - generatorDiagnostics.ReportConfigurationNotSupported(generatedDllImportAttr!, "Invalid syntax"); libraryImportData = new LibraryImportData("INVALID_CSHARP_SYNTAX"); } diff --git a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CompileFails.cs b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CompileFails.cs index 8bdf007ac8619..6436dd70a20bb 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CompileFails.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/CompileFails.cs @@ -149,9 +149,9 @@ public static IEnumerable CodeSnippetsToCompile_InvalidCode() { yield return new object[] { CodeSnippets.RecursiveImplicitlyBlittableStruct, 0, 1 }; yield return new object[] { CodeSnippets.MutuallyRecursiveImplicitlyBlittableStruct, 0, 2 }; - yield return new object[] { CodeSnippets.PartialPropertyName, 1, 2 }; - yield return new object[] { CodeSnippets.InvalidConstantForModuleName, 1, 1 }; - yield return new object[] { CodeSnippets.IncorrectAttributeFieldType, 1, 1 }; + yield return new object[] { CodeSnippets.PartialPropertyName, 0, 2 }; + yield return new object[] { CodeSnippets.InvalidConstantForModuleName, 0, 1 }; + yield return new object[] { CodeSnippets.IncorrectAttributeFieldType, 0, 1 }; } [Theory]