Skip to content

Support def-local tracked members #22537

Open
@KacperFKorban

Description

@KacperFKorban

Compiler version

0ea05aa

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions