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

Lint when a parameter should be marked as tracked, but couldn't be inferred #21987

Open
KacperFKorban opened this issue Nov 20, 2024 · 0 comments
Assignees
Labels
area:experimental:modularity Issues related to the modularity extension. area:linting Linting warnings enabled with -W or -Xlint itype:enhancement

Comments

@KacperFKorban
Copy link
Member

Description

The compiler should give a lint when a parameter should be marked as tracked, but the compiler couldn't infer it correctly.

Example

For the following example:

class C[T](tracked val t: T)

class D[T](val t: T) extends C[T](t) // warn `t` should be `tracked`

The compiler should warn, that t should most likely be marked as tracked, since it is used as a tracked parameter in C.

Details

This should be enabled under a linting flag that only works under experimental.modularity

@KacperFKorban KacperFKorban added itype:enhancement area:linting Linting warnings enabled with -W or -Xlint area:experimental:modularity Issues related to the modularity extension. labels Nov 20, 2024
@KacperFKorban KacperFKorban self-assigned this Nov 20, 2024
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. area:linting Linting warnings enabled with -W or -Xlint itype:enhancement
Projects
None yet
Development

No branches or pull requests

1 participant