Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wrighton <davidwr@microsoft.com>2015-12-03 23:00:40 +0300
committerDavid Wrighton <davidwr@microsoft.com>2015-12-03 23:00:40 +0300
commit9b9a794197a0dcc5e49a2e5d8531948578632c1e (patch)
tree240275ae8b54946cf5c545d8025d978c7c70ecc5 /src/Common
parent9dacc6dd120e6579ae84c9fd41cae48ddc63035f (diff)
Fix handling of single dimensional array hash codes
- Single dimensional array hash code calculation should consider its rank to be 1, not -1 - Add a unit test to verify the above behavior
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/src/TypeSystem/Common/ArrayType.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Common/src/TypeSystem/Common/ArrayType.cs b/src/Common/src/TypeSystem/Common/ArrayType.cs
index 9541676dc..cbdce101d 100644
--- a/src/Common/src/TypeSystem/Common/ArrayType.cs
+++ b/src/Common/src/TypeSystem/Common/ArrayType.cs
@@ -21,7 +21,7 @@ namespace Internal.TypeSystem
public override int GetHashCode()
{
- return Internal.NativeFormat.TypeHashingAlgorithms.ComputeArrayTypeHashCode(this.ElementType.GetHashCode(), _rank);
+ return Internal.NativeFormat.TypeHashingAlgorithms.ComputeArrayTypeHashCode(this.ElementType.GetHashCode(), _rank == -1 ? 1 : _rank);
}
public override DefType BaseType