-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Closed as not planned
Copy link
Labels
area:experimentalarea:private optionsIssues tied to -Y private/internal compiler settings.Issues tied to -Y private/internal compiler settings.itype:bug
Description
Compiler version
3.5.0-RC1-bin-20240501-e6bc130-NIGHTLY
Minimized example
Found in Scala 2 compiler forward-port #19897
private val Close = java.nio.CharBuffer.allocate(0)
Output
> scala-cli compile --server=false sandbox.scala -S 3.nightly -Ycheck-reentrant -Ylog:checkReentrant+
possible data race involving globally reachable variable isReadOnly in class CharBuffer: Boolean
use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
possible data race involving globally reachable variable address in class Buffer: Long
use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
2 errors found
Compilation failed
Expectation
isReadOnly
and address
are private/package private? variable, first of them can be only accessed via the accessor method. These should not be reported.
Metadata
Metadata
Assignees
Labels
area:experimentalarea:private optionsIssues tied to -Y private/internal compiler settings.Issues tied to -Y private/internal compiler settings.itype:bug