Skip to content

Type equality/subtyping evidence is not found for unions #8833

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

Closed
neko-kai opened this issue Apr 29, 2020 · 1 comment · Fixed by #12154
Closed

Type equality/subtyping evidence is not found for unions #8833

neko-kai opened this issue Apr 29, 2020 · 1 comment · Fixed by #12154
Assignees

Comments

@neko-kai
Copy link
Contributor

Minimized code

@main def Test = {
  implicitly[("k" | "v") <:< ("k" | "v")]
  implicitly[("k" | "v") =:= ("k" | "v")]
}

Output

Error:(127, 42) Cannot prove that ("k" : String/T) |/T ("v" : String/T) <:< ("k" : String/T) |/T ("v" : String/T)..
I found:
    <:<.refl[Nothing/T]
But method refl in object <:</T does not match type (("k" : String/T) |/T ("v" : String/T)) <:</T (("k" : String/T) |/T 
  ("v" : String/T)
).
  implicitly[("k" | "v") <:< ("k" | "v")]

Expectation

Expected it to compile

@abgruszecki
Copy link
Contributor

Possibly related? #10897

odersky added a commit to dotty-staging/dotty that referenced this issue Apr 20, 2021
odersky added a commit to dotty-staging/dotty that referenced this issue Apr 20, 2021
odersky added a commit that referenced this issue Apr 20, 2021
michelou pushed a commit to michelou/scala3 that referenced this issue Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants