Skip to content

Commit

Permalink
Add @sharable annotation to global counter
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Oct 1, 2023
1 parent b9e035b commit e1858db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/cc/CaptureRoot.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import printing.Showable
import util.SimpleIdentitySet
import Decorators.i
import scala.annotation.constructorOnly
import scala.annotation.internal.sharable

type CaptureRoot = TermRef | CaptureRoot.Var

object CaptureRoot:

private var nextId = 0
@sharable private var nextId = 0

case class Var(owner: Symbol, source: Symbol)(using @constructorOnly ictx: Context) extends CaptureRef, Showable:

Expand Down

0 comments on commit e1858db

Please sign in to comment.