-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Incorrect inference of dependent types in classes #15840
Labels
Comments
jchyb
added
itype:bug
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
Aug 10, 2022
KacperFKorban
added
area:typer
and removed
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
Aug 10, 2022
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 8, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 11, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 28, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 30, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 2, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 24, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 26, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 29, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 8, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 29, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 29, 2024
…5840 Faced with given C[T]: ... (with a new line after `:`) we now classify this as new given syntax, and assume ... is a template body. If one wants to use old syntax, one can still write given C[T] : ImplementedType ... # Conflicts: # compiler/src/dotty/tools/dotc/parsing/Parsers.scala
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Inspired by the shapeless-2 codebase, as I was looking what still remains to be done there and run into problems with type-level natural numbers implementation there.
Compiler version
3.2.1-RC1-bin-20220805-e560c2d-NIGHTLY, previous stable versions as well
Minimized code
Output
Expectation
Should compile and print "0", like the method version (def toInt) does. Very similar to #10929, but here the dependent types aren't part of the type classes, ToInt[n.N] simply cannot be found because of inference caused by constructor of a class, which I hope makes for a simpler minimization. If the issues are indeed more similar than I though I can move this post there.
The text was updated successfully, but these errors were encountered: