Skip to content
Browse files

synchronizes pendingVolatiles

Called from isVolatile, which is called from isStable, which is a part
of the public reflection API.
  • Loading branch information...
1 parent 4cbb935 commit dd148de5a875dd8d691ffdd983b7f2b978a148df @xeno-by xeno-by committed
View
4 src/reflect/scala/reflect/internal/Types.scala
@@ -2066,10 +2066,6 @@ trait Types extends api.Types { self: SymbolTable =>
def apply(value: Constant) = unique(new UniqueConstantType(value))
}
- /* Syncnote: The `volatile` var and `pendingVolatiles` mutable set need not be protected
- * with synchronized, because they are accessed only from isVolatile, which is called only from
- * Typer.
- */
private var volatileRecursions: Int = 0
private val pendingVolatiles = new mutable.HashSet[Symbol]
View
2 src/reflect/scala/reflect/runtime/SynchronizedSymbols.scala
@@ -61,6 +61,8 @@ private[reflect] trait SynchronizedSymbols extends internal.Symbols { self: Symb
}
}
+ override def isStable: Boolean = gilSynchronized { super.isStable }
+
// ------ creators -------------------------------------------------------------------
override protected def createAbstractTypeSymbol(name: TypeName, pos: Position, newFlags: Long): AbstractTypeSymbol =

1 comment on commit dd148de

@scala-jenkins

Job pr-rangepos-per-commit failed for dd148de (results):


Took 12 s.
sad kitty
to rebuild, comment "PLS REBUILD/pr-rangepos-per-commit@dd148de"on PR #2083

Please sign in to comment.
Something went wrong with that request. Please try again.