Fixed NPE when calling hashCode on a product containing nulls (#216)

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@16964 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
dragos 2009-01-21 16:02:59 +00:00
parent e2414065b1
commit 931d669ca5
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ object ScalaRunTime {
var i = 0 var i = 0
while (i < arr) { while (i < arr) {
val elem = x.productElement(i) val elem = x.productElement(i)
code = code * 41 + (if (elem eq null) 0 else elem.hashCode()) code = code * 41 + (if (elem == null) 0 else elem.hashCode())
i += 1 i += 1
} }
code code