diff --git a/src/tests/Loader/classloader/StaticVirtualMethods/Regression/GitHub_73658.cs b/src/tests/Loader/classloader/StaticVirtualMethods/Regression/GitHub_73658.cs deleted file mode 100644 index fe9c2dcebc6c73..00000000000000 --- a/src/tests/Loader/classloader/StaticVirtualMethods/Regression/GitHub_73658.cs +++ /dev/null @@ -1,115 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.Reflection; -using Xunit; - -namespace GetInterfaceMapWithStaticVirtualsAndConstraints -{ - internal static class Program - { - static int Main() - { - Type i, s; - InterfaceMapping imap; - Console.WriteLine("Inner"); - s = typeof(Program).Assembly.GetType("GetInterfaceMapWithStaticVirtualsAndConstraints.Outer`1+Inner"); - s = s.MakeGenericType(typeof(int)); - i = s.GetInterface("IStatics"); - imap = s.GetInterfaceMap(i); - foreach (var iMethod in imap.InterfaceMethods) - { - Console.WriteLine($"{iMethod.DeclaringType } {iMethod}"); - } - - Assert.Equal(1, imap.TargetMethods.Length); - foreach (var iMethod in imap.TargetMethods) - { - Console.WriteLine($"{iMethod.DeclaringType } {iMethod}"); - Assert.Equal(typeof(Outer.Inner), iMethod.DeclaringType); - } - - i = s.GetInterface("IInstance"); - imap = s.GetInterfaceMap(i); - foreach (var iMethod in imap.InterfaceMethods) - { - Console.WriteLine($"{iMethod.DeclaringType } {iMethod}"); - } - - Assert.Equal(1, imap.TargetMethods.Length); - foreach (var iMethod in imap.TargetMethods) - { - Console.WriteLine($"{iMethod.DeclaringType } {iMethod}"); - Assert.Equal(typeof(Outer.Inner), iMethod.DeclaringType); - } - - Console.WriteLine("Inner2"); - s = typeof(Program).Assembly.GetType("GetInterfaceMapWithStaticVirtualsAndConstraints.Outer`1+Inner2"); - s = s.MakeGenericType(typeof(int)); - i = s.GetInterface("IStatics"); - imap = s.GetInterfaceMap(i); - foreach (var iMethod in imap.InterfaceMethods) - { - Console.WriteLine($"{iMethod.DeclaringType } {iMethod}"); - } - Assert.Equal(1, imap.TargetMethods.Length); - foreach (var iMethod in imap.TargetMethods) - { - Console.WriteLine($"{iMethod.DeclaringType } {iMethod}"); - Assert.Equal(typeof(Outer.IStaticsImpl), iMethod.DeclaringType); - } - - i = s.GetInterface("IInstance"); - imap = s.GetInterfaceMap(i); - foreach (var iMethod in imap.InterfaceMethods) - { - Console.WriteLine($"{iMethod.DeclaringType } {iMethod}"); - } - Assert.Equal(1, imap.TargetMethods.Length); - foreach (var iMethod in imap.TargetMethods) - { - Console.WriteLine($"{iMethod.DeclaringType } {iMethod}"); - Assert.Equal(typeof(Outer.IInstanceImpl), iMethod.DeclaringType); - } - - return 100; - } - } - - class Outer - { - public struct Inner : IStatics, IInstance - { - public void M() where TInner : IConstraint { } - public static void MStatic() where TInner : IConstraint { } - } - - public struct Inner2 : IStaticsImpl, IInstanceImpl - { - - } - - public interface IStaticsImpl : IStatics - { - static void IStatics.MStatic() { } - } - - public interface IInstanceImpl : IInstance - { - void IInstance.M() { } - } - - public interface IStatics - { - static abstract void MStatic() where TInner2 : IConstraint; - } - - public interface IInstance - { - abstract void M() where TInner2 : IConstraint; - } - - public interface IConstraint { } - } -} diff --git a/src/tests/Loader/classloader/StaticVirtualMethods/Regression/GitHub_78865.cs b/src/tests/Loader/classloader/StaticVirtualMethods/Regression/GitHub_78865.cs deleted file mode 100644 index 254a854ed3094f..00000000000000 --- a/src/tests/Loader/classloader/StaticVirtualMethods/Regression/GitHub_78865.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; - -namespace StaticVirtualsAndMethodConstraintsAndDefaultImplementation -{ - public interface ITestItem - { - } - - public interface IStaticInterfaceBase - where T : class - where TRequest : IStaticInterfaceBase - { - static abstract int TryInvoke(TItem item, TRequest request) where TItem : ITestItem; - } - - public interface IStaticInterface : IStaticInterfaceBase - where T : class - where TRequest : IStaticInterface - { - static int IStaticInterfaceBase.TryInvoke(TItem item, TRequest request) - { - return 100; - } - } - - public class Request : IStaticInterface - { - } - - internal class Program - { - public static int Invoke(TRequest request) - where T : class - where TRequest : IStaticInterfaceBase => - TRequest.TryInvoke((ITestItem) null!, request); - - public static int Main(string[] args) => Invoke(new Request()); - } -}