diff --git a/code/Binary.SourceGeneration.ObjectCrossTests/InheritanceTests/InterfaceShadowingTests.cs b/code/Binary.SourceGeneration.ObjectCrossTests/InheritanceTests/InterfaceShadowingTests.cs index 95fbab09..cb28de06 100644 --- a/code/Binary.SourceGeneration.ObjectCrossTests/InheritanceTests/InterfaceShadowingTests.cs +++ b/code/Binary.SourceGeneration.ObjectCrossTests/InheritanceTests/InterfaceShadowingTests.cs @@ -155,7 +155,7 @@ public void CompareInheritanceTest(Type x, Type y, int expected) Assert.NotNull(symbolX); Assert.NotNull(symbolY); - var symbolResult = Symbols.CompareInheritance(compilation, symbolX, symbolY, CancellationToken.None); + var symbolResult = Symbols.CompareInheritance(compilation, symbolX, symbolY); var memberResult = reflectionFunction.Invoke(x, y); Assert.Equal(expected, symbolResult); Assert.Equal(expected, memberResult); @@ -184,7 +184,7 @@ public void CompareInheritanceWithInvalidTypeTest(Type x, Type y, string message Assert.NotNull(symbolX); Assert.NotNull(symbolY); - var alpha = Assert.Throws(() => Symbols.CompareInheritance(compilation, symbolX, symbolY, CancellationToken.None)); + var alpha = Assert.Throws(() => Symbols.CompareInheritance(compilation, symbolX, symbolY)); var bravo = Assert.Throws(() => reflectionFunction.Invoke(x, y)); Assert.Null(alpha.ParamName); Assert.Null(bravo.ParamName); @@ -236,19 +236,4 @@ public void GetAllFieldsAndPropertiesForNonInterfaceTypeWithInvalidTypeTest(Type Assert.Equal(message, alpha.Message); Assert.Equal(message, bravo.Message); } - - [Fact(DisplayName = "Compare Inheritance With Cancellation Token Test")] - public void CompareInheritanceCancellationTest() - { - var source = new CancellationTokenSource(); - var compilation = CompilationModule.CreateCompilationFromThisAssembly(); - var symbolString = compilation.GetSpecialType(SpecialType.System_String); - var symbolObject = compilation.GetSpecialType(SpecialType.System_Object); - var result = Symbols.CompareInheritance(compilation, symbolObject, symbolString, source.Token); - Assert.Equal(1, result); - - source.Cancel(); - var exception = Assert.Throws(() => Symbols.CompareInheritance(compilation, symbolObject, symbolString, source.Token)); - Assert.Equal(source.Token, exception.CancellationToken); - } } diff --git a/code/Binary.SourceGeneration/Symbols.cs b/code/Binary.SourceGeneration/Symbols.cs index 0d3d8882..04529971 100644 --- a/code/Binary.SourceGeneration/Symbols.cs +++ b/code/Binary.SourceGeneration/Symbols.cs @@ -209,11 +209,10 @@ public static ImmutableArray FilterFieldsAndProperties(ImmutableArray