diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/runtime/ScalaRunTime.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala index c98fd33c6a..bee37d44c1 100644 --- a/src/library/scala/runtime/ScalaRunTime.scala +++ b/src/library/scala/runtime/ScalaRunTime.scala @@ -86,7 +86,8 @@ object ScalaRunTime { val arr = x.productArity var i = 0 while (i < arr) { - code = code * 41 + x.productElement(i).hashCode() + val elem = x.productElement(i) + code = code * 41 + (if (elem eq null) 0 else elem.hashCode()) i += 1 } code |