Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support def-local tracked members #22537

Open
KacperFKorban opened this issue Feb 6, 2025 · 0 comments · May be fixed by #22538
Open

Support def-local tracked members #22537

KacperFKorban opened this issue Feb 6, 2025 · 0 comments · May be fixed by #22538
Assignees
Labels
area:experimental:modularity Issues related to the modularity extension. itype:enhancement

Comments

@KacperFKorban
Copy link
Member

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.

@KacperFKorban KacperFKorban added area:experimental:modularity Issues related to the modularity extension. itype:enhancement labels Feb 6, 2025
@KacperFKorban KacperFKorban self-assigned this Feb 6, 2025
@KacperFKorban KacperFKorban linked a pull request Feb 6, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:experimental:modularity Issues related to the modularity extension. itype:enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant