From 10424c6c8e4310ceffea929115e27cf658773d85 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Fri, 8 May 2015 16:21:45 +0200 Subject: Workaround #548. --- src/dotty/runtime/LazyVals.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/dotty/runtime/LazyVals.scala b/src/dotty/runtime/LazyVals.scala index 2aa45e6fd..38deec6f5 100644 --- a/src/dotty/runtime/LazyVals.scala +++ b/src/dotty/runtime/LazyVals.scala @@ -60,7 +60,10 @@ object LazyVals { }.toArray @inline def getMonitor(obj: Object, fieldId: Int = 0) = { - var id = (java.lang.System.identityHashCode(obj) + fieldId) % base + var id = ( + /*java.lang.System.identityHashCode(obj) + */ // should be here, but #548 + fieldId) % base + if (id < 0) id += base monitors(id) } -- cgit v1.2.3