@@ -238,6 +238,10 @@ private static void IsGenericTypeTests()
238
238
IsFalse ( new ClassUsingIsGenericTypeOnT < string > ( ) . IsGenericTypeFromArray ( ) ) ;
239
239
IsFalse ( new ClassUsingIsGenericTypeOnT < object > ( ) . IsGenericTypeFromArray ( ) ) ;
240
240
IsFalse ( new ClassUsingIsGenericTypeOnT < int [ ] > ( ) . IsGenericTypeFromArray ( ) ) ;
241
+ IsFalse ( new ClassUsingIsGenericTypeOnT < GenericSimpleClass < int > > ( ) . IsGenericTypeFromArray ( ) ) ;
242
+ IsFalse ( new ClassUsingIsGenericTypeOnT < IGenericInterface < string > > ( ) . IsGenericTypeFromArray ( ) ) ;
243
+ IsFalse ( new ClassUsingIsGenericTypeOnT < List < object > > ( ) . IsGenericTypeFromArray ( ) ) ;
244
+ IsFalse ( new ClassUsingIsGenericTypeOnT < Action < string > > ( ) . IsGenericTypeFromArray ( ) ) ;
241
245
242
246
IsTrue ( typeof ( GenericSimpleClass < int > ) . IsGenericType ) ;
243
247
IsTrue ( typeof ( GenericSimpleClass < > ) . IsGenericType ) ;
@@ -266,10 +270,6 @@ private static void IsGenericTypeTests()
266
270
IsTrue ( new ClassUsingIsGenericTypeOnT < GenericSimpleClass < int > > ( ) . IsGenericType ( ) ) ;
267
271
IsTrue ( new ClassUsingIsGenericTypeOnT < int ? > ( ) . IsGenericType ( ) ) ;
268
272
IsTrue ( new ClassUsingIsGenericTypeOnT < Action < string > > ( ) . IsGenericType ( ) ) ;
269
- IsFalse ( new ClassUsingIsGenericTypeOnT < GenericSimpleClass < int > > ( ) . IsGenericTypeFromArray ( ) ) ;
270
- IsFalse ( new ClassUsingIsGenericTypeOnT < IGenericInterface < string > > ( ) . IsGenericTypeFromArray ( ) ) ;
271
- IsFalse ( new ClassUsingIsGenericTypeOnT < List < object > > ( ) . IsGenericTypeFromArray ( ) ) ;
272
- IsFalse ( new ClassUsingIsGenericTypeOnT < Action < string > > ( ) . IsGenericTypeFromArray ( ) ) ;
273
273
IsTrue ( new ClassUsingIsGenericTypeOnT < char > ( ) . IsGenericTypeFromOtherGenericType ( ) ) ;
274
274
IsTrue ( new ClassUsingIsGenericTypeOnT < string > ( ) . IsGenericTypeFromOtherGenericType ( ) ) ;
275
275
IsTrue ( new ClassUsingIsGenericTypeOnT < object > ( ) . IsGenericTypeFromOtherGenericType ( ) ) ;
@@ -350,10 +350,13 @@ static void ThrowsNRE(Action action, [CallerLineNumber] int line = 0, [CallerFil
350
350
351
351
public class ClassUsingIsGenericTypeOnT < T >
352
352
{
353
+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
353
354
public bool IsGenericType ( ) => typeof ( T ) . IsGenericType ;
354
355
356
+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
355
357
public bool IsGenericTypeFromArray ( ) => typeof ( T [ ] ) . IsGenericType ;
356
358
359
+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
357
360
public bool IsGenericTypeFromOtherGenericType ( ) => typeof ( GenericSimpleClass < T > ) . IsGenericType ;
358
361
}
359
362
0 commit comments