Skip to content

Commit f46a4a3

Browse files
som-snyttdwijnand
authored andcommitted
Reusable is not thread-safe
1 parent f91a09d commit f46a4a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/reflect/scala/reflect/internal/Symbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3771,7 +3771,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
37713771
}
37723772

37733773
private[this] val cloneSymbolsSubstSymMap: ReusableInstance[SubstSymMap] =
3774-
ReusableInstance[SubstSymMap](SubstSymMap())
3774+
ReusableInstance[SubstSymMap](SubstSymMap(), enabled = isCompilerUniverse)
37753775

37763776
def cloneSymbolsAtOwner(syms: List[Symbol], owner: Symbol): List[Symbol] =
37773777
deriveSymbols(syms, _ cloneSymbol owner)

src/reflect/scala/reflect/internal/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4042,7 +4042,7 @@ trait Types
40424042
refinedType(parents, owner, newScope, owner.pos)
40434043

40444044
private[this] val copyRefinedTypeSSM: ReusableInstance[SubstSymMap] =
4045-
ReusableInstance[SubstSymMap](SubstSymMap())
4045+
ReusableInstance[SubstSymMap](SubstSymMap(), enabled = isCompilerUniverse)
40464046

40474047
def copyRefinedType(original: RefinedType, parents: List[Type], decls: Scope) =
40484048
if ((parents eq original.parents) && (decls eq original.decls)) original

0 commit comments

Comments
 (0)