-
Notifications
You must be signed in to change notification settings - Fork 338
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
Metals does not infer concrete type of path dependent types #6230
Comments
Thanks for reporting! We'll take a look at it! |
Looks like this is an issue in the compiler, mentioned by @rochala |
I found a simpler case. //> using scala 3.4.0
object Obj {
trait A { self =>
type T
def a : T = ???
}
val x: A { type T = Int } = ???
val z = x.a
}
|
Hi, @pityka, sorry for nudging but are you still planning to continue your work on this issue or would you rather someone took over? |
I do plan, i did not forget. Sorry I was distracted. As this is hobby I can not commit for a deadline so it is also fine if somebody else finishes if you find bandwidth and need it before I get to it. On 25 Apr 2024, at 09:01, Katarzyna Marek ***@***.***> wrote:
Hi, @pityka, sorry for nudging but are you still planning to continue your work on this issue or would you rather someone took over?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
No worries, take your time, I'm just making sure it's not forgotten about 😄 |
Fixes scalameta/metals#6230 --------- Co-authored-by: Katarzyna Marek <[email protected]>
Fixes scalameta/metals#6230 --------- Co-authored-by: Katarzyna Marek <[email protected]> [Cherry-picked e2c456f]
Describe the bug
In this snippet the identifier
y
in the lambda has typeA{type T = Int}
as verified by the compiler if type ascription is present. However if type ascription is not present, then metals infers it toA{type T = x.T }
.Expected behavior
Metals infers the same type as the compiler.
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
v1.2.2
Extra context or search terms
No response
The text was updated successfully, but these errors were encountered: