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

RepeatedParamType should not be a subtype of anything (until ElimRepeated) #5792

Closed
adriaanm opened this issue Jan 25, 2019 · 1 comment
Closed

Comments

@adriaanm
Copy link
Contributor

adriaanm commented Jan 25, 2019

While looking at scala/bug#4775, scala/bug#8344, scala/bug#11015, I was thinking that T* should not be a subtype of Seq[T] (nor even Any, as it's not an expression type) until we've eliminated repeated params. This is important for overloading resolution (see referenced bugs).

Right? 🤔

@abgruszecki
Copy link
Contributor

abgruszecki commented Apr 3, 2019

compat:scala2, since we reintroduce behaviour that was deemed a bug and removed in scala/bug#8344.

Some notes from me trying to fix this:

  • overload selection sees Seq[X] @Repeated, which suggests to me that it happens post-ElimRepeated
  • we cannot really special-case subtyping for Y @Repeated, since this is also the type of the argument inside the body of a function

abgruszecki added a commit to dotty-staging/dotty that referenced this issue Apr 4, 2019
abgruszecki added a commit to dotty-staging/dotty that referenced this issue Apr 4, 2019
@abgruszecki abgruszecki mentioned this issue Apr 18, 2019
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