File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/tests/JIT/Regression/JitBlue/Runtime_120270 Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -71,21 +71,23 @@ static void Foo<T>(object[] x)
7171 [ Fact ]
7272 public static int TestEntryPoint3 ( )
7373 {
74+ Type enumeratorType = null ;
7475 for ( int i = 0 ; i < 100_000 ; i ++ )
7576 {
7677 Derived [ ] d = [ new Derived ( ) ] ;
7778 IEnumerable < Base > e = d ;
7879 IEnumerator < Base > en = e . GetEnumerator ( ) ;
79- string s = en . GetType ( ) . ToString ( ) ;
80+ Type currentEnumeratorType = en . GetType ( ) ;
8081
8182 if ( i == 0 )
8283 {
83- Console . WriteLine ( $ "Enumerator type: { s } ") ;
84+ Console . WriteLine ( $ "Enumerator type: { currentEnumeratorType . ToString ( ) } ") ;
85+ enumeratorType = currentEnumeratorType ;
8486 }
8587
86- if ( ! s . Equals ( "System.SZGenericArrayEnumerator`1[Base]" ) )
88+ if ( enumeratorType != currentEnumeratorType )
8789 {
88- Console . WriteLine ( $ "Enumerator type changed at { i } to { s } ") ;
90+ Console . WriteLine ( $ "Enumerator type changed at { i } from { enumeratorType . ToString ( ) } to { currentEnumeratorType . ToString ( ) } ") ;
8991 return - 1 ;
9092 }
9193 }
You can’t perform that action at this time.
0 commit comments