summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/reflect/scala/reflect/runtime/SynchronizedTypes.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/runtime/SynchronizedTypes.scala b/src/reflect/scala/reflect/runtime/SynchronizedTypes.scala
index b9b140a2fd..9b4d8d1d48 100644
--- a/src/reflect/scala/reflect/runtime/SynchronizedTypes.scala
+++ b/src/reflect/scala/reflect/runtime/SynchronizedTypes.scala
@@ -24,7 +24,8 @@ trait SynchronizedTypes extends internal.Types { self: SymbolTable =>
// i.e. they have their caches cleaned up automatically on per-run basis,
// therefore they should use vanilla uniques, which are faster
if (!isCompilerUniverse) {
- val result = if (uniques contains tp) uniques(tp).get else null
+ val inCache = uniques get tp
+ val result = if (inCache.isDefined) inCache.get.get else null
if (result ne null) result.asInstanceOf[T]
else {
uniques(tp) = new WeakReference(tp)