File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
src/tests/nativeaot/SmokeTests/UnitTests Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ public static int Run()
46
46
TestSharedInterfaceMethods . Run ( ) ;
47
47
TestGenericAnalysis . Run ( ) ;
48
48
TestRuntime108229Regression . Run ( ) ;
49
+ TestRuntime109893Regression . Run ( ) ;
49
50
TestCovariantReturns . Run ( ) ;
50
51
TestDynamicInterfaceCastable . Run ( ) ;
51
52
TestStaticInterfaceMethodsAnalysis . Run ( ) ;
@@ -872,6 +873,37 @@ public static void Run()
872
873
}
873
874
}
874
875
876
+ class TestRuntime109893Regression
877
+ {
878
+ class Type < T > : IType < T > ;
879
+
880
+ class MyVisitor : IVisitor
881
+ {
882
+ public object ? Visit < T > ( IType < T > _ ) => typeof ( T ) ;
883
+ }
884
+
885
+ interface IType
886
+ {
887
+ object ? Accept ( IVisitor visitor ) ;
888
+ }
889
+
890
+ interface IType < T > : IType
891
+ {
892
+ object ? IType . Accept ( IVisitor visitor ) => visitor . Visit ( this ) ;
893
+ }
894
+
895
+ interface IVisitor
896
+ {
897
+ object ? Visit < T > ( IType < T > type ) ;
898
+ }
899
+
900
+ public static void Run ( )
901
+ {
902
+ IType type = new Type < object > ( ) ;
903
+ type . Accept ( new MyVisitor ( ) ) ;
904
+ }
905
+ }
906
+
875
907
class TestCovariantReturns
876
908
{
877
909
interface IFoo
You can’t perform that action at this time.
0 commit comments