Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b73e372

Browse files
committedJul 28, 2019
Don't flag memo cache names as race-prone in reentrancy checking
1 parent 74d8c8e commit b73e372

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎compiler/src/dotty/tools/dotc/transform/CheckReentrant.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Flags._
77
import Contexts.Context
88
import Symbols._
99
import Decorators._
10+
import NameKinds.MemoCacheName
1011

1112

1213
/** A no-op transform that checks whether the compiled sources are re-entrant.
@@ -44,6 +45,7 @@ class CheckReentrant extends MiniPhase {
4445
def isIgnored(sym: Symbol)(implicit ctx: Context): Boolean =
4546
sym.hasAnnotation(sharableAnnot()) ||
4647
sym.hasAnnotation(unsharedAnnot()) ||
48+
sym.name.is(MemoCacheName) ||
4749
sym.owner == defn.EnumValuesClass
4850
// enum values are initialized eagerly before use
4951
// in the long run, we should make them vals

0 commit comments

Comments
 (0)
Please sign in to comment.