Changeset 8577 for trunk/sources
- Timestamp:
- 09/05/12 14:24:13 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/TypeExtensions.cs
r8571 r8577 110 110 111 111 if (baseTypeGenericArgument.IsGenericParameter ^ subTypeGenericArgument.IsGenericParameter) return false; 112 if (baseTypeGenericArgument .IsAssignableFrom(subTypeGenericArgument)) continue;112 if (baseTypeGenericArgument == subTypeGenericArgument) continue; 113 113 if (!baseTypeGenericArgument.IsGenericParameter && !subTypeGenericArgument.IsGenericParameter) return false; 114 114 -
trunk/sources/HeuristicLab.Tests/HeuristicLab.PluginInfraStructure-3.3/TypeDiscoveryTest.cs
r8571 r8577 41 41 Assert.IsTrue(typeof(List<int>).IsSubTypeOf(typeof(IList))); 42 42 Assert.IsTrue(typeof(List<>).IsSubTypeOf(typeof(IList))); 43 Assert.IsFalse(typeof(NamedItemCollection<>).IsSubTypeOf(typeof(ICollection<IItem>))); 44 Assert.IsFalse(typeof(NamedItemCollection<>).IsSubTypeOf(typeof(ICollection<NamedItem>))); 43 45 44 Assert.IsTrue(typeof(IList<IItem>).IsSubTypeOf(typeof(IList<IItem>))); 45 Assert.IsTrue(typeof(List<IntValue>).IsSubTypeOf(typeof(IList<IItem>))); 46 Assert.IsTrue(typeof(List<IntValue>).IsSubTypeOf(typeof(List<IItem>))); 46 47 Assert.IsTrue(typeof(List<IItem>).IsSubTypeOf(typeof(IList<IItem>))); 48 Assert.IsFalse(typeof(IList<IntValue>).IsSubTypeOf(typeof(IList<IItem>))); 49 Assert.IsTrue(typeof(List<IItem>).IsSubTypeOf(typeof(IList<IItem>))); 47 50 Assert.IsFalse(typeof(ItemList<>).IsSubTypeOf(typeof(IList<IItem>))); 48 51 Assert.IsFalse(typeof(ItemList<>).IsSubTypeOf(typeof(List<IItem>)));
Note: See TracChangeset
for help on using the changeset viewer.