diff options
author | Michal Strehovský <michals@microsoft.com> | 2015-12-15 05:34:28 +0300 |
---|---|---|
committer | Michal Strehovský <michals@microsoft.com> | 2015-12-16 09:36:30 +0300 |
commit | 34229a8d504b1990b635aa448122a6d847c24010 (patch) | |
tree | b45aa7878c1b2728137c3ab903de52dc5a2e8507 /src/Common | |
parent | f759298f576d731f4f71b0d2fd926e5b318dda52 (diff) |
Fix up comments about what interface lists may contain duplicates
This was switched around. ExplicitlyImplementedInterfaces is the list
that is coming directly from the metadata and can have duplicates.
RuntimeInterfaces may not have duplicates.
Diffstat (limited to 'src/Common')
3 files changed, 4 insertions, 3 deletions
diff --git a/src/Common/src/TypeSystem/Common/MetadataRuntimeInterfacesAlgorithm.cs b/src/Common/src/TypeSystem/Common/MetadataRuntimeInterfacesAlgorithm.cs index b8e073420..5ca9786c6 100644 --- a/src/Common/src/TypeSystem/Common/MetadataRuntimeInterfacesAlgorithm.cs +++ b/src/Common/src/TypeSystem/Common/MetadataRuntimeInterfacesAlgorithm.cs @@ -18,6 +18,9 @@ namespace Internal.TypeSystem { MetadataType type = (MetadataType)_type; + // TODO: need to implement deduplication + // https://github.com/dotnet/corert/issues/208 + if (type.IsInterface) { // For interfaces, the set of interfaces implemented directly matches the diff --git a/src/Common/src/TypeSystem/Common/MetadataType.Interfaces.cs b/src/Common/src/TypeSystem/Common/MetadataType.Interfaces.cs index 0992ad662..3900eb91f 100644 --- a/src/Common/src/TypeSystem/Common/MetadataType.Interfaces.cs +++ b/src/Common/src/TypeSystem/Common/MetadataType.Interfaces.cs @@ -11,7 +11,7 @@ namespace Internal.TypeSystem public abstract partial class MetadataType : DefType { /// <summary> - /// The interfaces explicitly declared as implemented by this MetadataType. Duplicates are not permitted. + /// The interfaces explicitly declared as implemented by this MetadataType in the type's metadata. /// These correspond to the InterfaceImpls of a type in metadata /// </summary> public abstract DefType[] ExplicitlyImplementedInterfaces diff --git a/src/Common/src/TypeSystem/Ecma/EcmaType.Interfaces.cs b/src/Common/src/TypeSystem/Ecma/EcmaType.Interfaces.cs index 10d01a917..864725de4 100644 --- a/src/Common/src/TypeSystem/Ecma/EcmaType.Interfaces.cs +++ b/src/Common/src/TypeSystem/Ecma/EcmaType.Interfaces.cs @@ -43,8 +43,6 @@ namespace Internal.TypeSystem.Ecma implementedInterfaces[i++] = (DefType)_module.GetType(interfaceImplementation.Interface); } - // TODO Add duplicate detection - return (_implementedInterfaces = implementedInterfaces); } } |