File tree Expand file tree Collapse file tree
src/tests/JIT/Regression/JitBlue/Runtime_120270 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22// The .NET Foundation licenses this file to you under the MIT license.
33
44using System ;
5+ using System . Collections . Generic ;
56using System . Linq ;
67using System . Runtime . CompilerServices ;
78using Xunit ;
@@ -66,5 +67,29 @@ static void Foo<T>(object[] x)
6667 }
6768 }
6869 }
70+
71+ [ Fact ]
72+ public static int TestEntryPoint3 ( )
73+ {
74+ for ( int i = 0 ; i < 100_000 ; i ++ )
75+ {
76+ Derived [ ] d = [ new Derived ( ) ] ;
77+ IEnumerable < Base > e = d ;
78+ IEnumerator < Base > en = e . GetEnumerator ( ) ;
79+ string s = en . GetType ( ) . ToString ( ) ;
80+
81+ if ( i == 0 )
82+ {
83+ Console . WriteLine ( $ "Enumerator type: { s } ") ;
84+ }
85+
86+ if ( ! s . Equals ( "System.SZGenericArrayEnumerator`1[Base]" ) )
87+ {
88+ Console . WriteLine ( $ "Enumerator type changed at { i } to { s } ") ;
89+ return - 1 ;
90+ }
91+ }
92+ return 100 ;
93+ }
6994}
7095
You can’t perform that action at this time.
0 commit comments