Open
Description
Compiler version
Minimized code
//> using scala 3.nightly
import scala.language.experimental.modularity
def Test =
tracked val x = 1
val _: 1 = x
Output
-- [E156] Syntax Error: wiadro/tracked-val-weaker.scala:6:14 ---------
6 | tracked val x = 1
| ^^^^^^^^^^^^^^^^^
| Modifier tracked is not allowed for this definition
-- [E007] Type Mismatch Error: wiadro/tracked-val-weaker.scala:7:13 --
7 | val _: 1 = x
| ^
| Found: (x : Int)
| Required: (1 : Int)
|
| longer explanation available when compiling with `-explain`
Expectation
Successfully compile without errors.