-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Dependent types + Match types type resolution issue #19633
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
Labels
area:match-types
area:typer
itype:bug
regression
This worked in a previous version but doesn't anymore
Milestone
Comments
Paging @sjrd |
output from current -- [E007] Type Mismatch Error: repro.scala:19:73 -------------------------------
19 | def stringWithFunction(req: StringRequest): String = withFunction(req)(_.getClass.getSimpleName)
| ^^^^^^^^^^^^^^^^^^^^^^^^
|Found: Repro.StringRequest => String
|Required: Repro.StringRequest => Repro.Responsive.Response[Repro.StringRequest]
|----------------------------------------------------------------------------
| Explanation (enabled by `-explain`)
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| Tree: {
| def $anonfun(_$1: Repro.StringRequest):
| Repro.Responsive.Response[Repro.StringRequest] =
| _$1.getClass[Repro.StringRequest]().getSimpleName()
| closure($anonfun)
| }
| I tried to show that
| Repro.StringRequest => String
| conforms to
| Repro.StringRequest => Repro.Responsive.Response[Repro.StringRequest]
| but none of the attempts shown below succeeded:
|
|
| The tests were made under a constraint with:
| uninstantiated variables:
| constrained types:
| [R <: Repro.Responsive]
| (request: R)
| (call: R => Repro.Responsive.Response[R]): Repro.Responsive.Response[R]
| bounds:
| R := Repro.StringRequest
| ordering:
| co-deps:
| contra-deps:
----------------------------------------------------------------------------
-- [E172] Type Error: repro.scala:21:72 ----------------------------------------
21 | def stringWithImplicit(req: StringRequest): String = withImplicit(req)
| ^
|No ClassTag available for Repro.Responsive.Response[Repro.StringRequest]
2 errors found |
Probably a missing |
Bisect points to: 97725d7 |
sjrd
added a commit
to sjrd/dotty
that referenced
this issue
Mar 25, 2024
Not sure what fixed it, but it seems to be good now.
sjrd
added a commit
that referenced
this issue
Mar 25, 2024
WojciechMazur
pushed a commit
that referenced
this issue
Jul 4, 2024
Not sure what fixed it, but it seems to be good now. [Cherry-picked 230519f]
WojciechMazur
added a commit
that referenced
this issue
Jul 5, 2024
Backports #20013 to the LTS branch. PR submitted by the release tooling. [skip ci]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:match-types
area:typer
itype:bug
regression
This worked in a previous version but doesn't anymore
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
3.4.0-RC4
Minimized code
Output
Expectation
Hello, decided to try out Scala 3.4.0-RC4 inside my project and found some strange behavior, this works on 3.3.1 and on 3.3.2-RC3.
If I explicitly fill the generic parameter error goes away.
Is this something that is already covered by existing issues or is this something new?
The text was updated successfully, but these errors were encountered: