I have the following generic type with a generic type constraint.
public class GenericType<T> where T: IFoo
{
}
Then I try to create a closed generic type from the open generic type.
var fooGenericType = typeof(GenericType<>).MakeGenericType (typeof(IFoo));
var intGenericType = typeof(GenericType<>).MakeGenericType (typeof(int));
When running in the simulator it fails on trying to create a closed generic type using an int as the type parameter which is expected.
BUT, when running on the actual device (iPhone), it will also create a closed generic type using an int. It seems like it does not respect the generic constraint, but this happens only on the device. On the simulator everything is as expected.
Any ideas?