aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Petrashko <dark@d-d.me>2017-04-19 11:32:20 -0500
committerGitHub <noreply@github.com>2017-04-19 11:32:20 -0500
commit423fe1142702a93613e625f1deb9c2634cf3567b (patch)
treeb463f3b0275e7619cd617fe07cd52a77877f5ecc
parentd799a9162da02eb6033f5d7af5ea48849cd4232b (diff)
downloaddotty-DarkDimius-patch-1.zip
dotty-DarkDimius-patch-1.tar.gz
dotty-DarkDimius-patch-1.tar.bz2
Long time since I wrote this code. Forgot that `State` doesn't read the state.
-rw-r--r--library/src/dotty/runtime/LazyVals.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/src/dotty/runtime/LazyVals.scala b/library/src/dotty/runtime/LazyVals.scala
index 9a7e153..2094cff 100644
--- a/library/src/dotty/runtime/LazyVals.scala
+++ b/library/src/dotty/runtime/LazyVals.scala
@@ -55,7 +55,7 @@ object LazyVals {
else if (state == 2) {
val monitor = getMonitor(t, ord)
monitor.synchronized {
- if (STATE(cur, ord) == 2)
+ if (STATE(get(t, offset), ord) == 2) // make sure notification did not happen yet.
monitor.wait()
}
}