-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Inline methods clash after erasure #6750
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
Comments
Should the following also be accepted? And any other non erased type? Or should it be only an exception for by-name parameters? inline def foo(i: () => Int) = ???
inline def foo(l: () => Long) = ??? |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 9, 2019
Before `Erasure` the signatures will contain `=>X` instead of `Function0`. This makes signature clashes of by-name parameters only show up after `Erasure`. This allows for `inline` methods to have by-name parameter overloads.
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 9, 2019
Before `Erasure` the signatures will contain `=>X` instead of `Function0`. This makes signature clashes of by-name parameters only show up after `Erasure`. This allows for `inline` methods to have by-name parameter overloads.
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 11, 2019
Before `Erasure` the signatures will contain `=>X` instead of `Function0`. This makes signature clashes of by-name parameters only show up after `Erasure`. This allows for `inline` methods to have by-name parameter overloads.
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 15, 2019
Before `Erasure` the signatures will contain `=>X` instead of `Function0`. This makes signature clashes of by-name parameters only show up after `Erasure`. This allows for `inline` methods to have by-name parameter overloads.
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 15, 2019
Before `Erasure` the signatures will contain `=>X` instead of `Function0`. This makes signature clashes of by-name parameters only show up after `Erasure`. This allows for `inline` methods to have by-name parameter overloads.
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 16, 2019
Before `Erasure` the signatures will contain `=>X` instead of `Function0`. This makes signature clashes of by-name parameters only show up after `Erasure`. This allows for `inline` methods to have by-name parameter overloads.
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 22, 2019
Before `Erasure` the signatures will contain `=>X` instead of `Function0`. This makes signature clashes of by-name parameters only show up after `Erasure`. This allows for `inline` methods to have by-name parameter overloads.
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 30, 2019
Before `Erasure` the signatures will contain `=>X` instead of `Function0`. This makes signature clashes of by-name parameters only show up after `Erasure`. This allows for `inline` methods to have by-name parameter overloads.
With the new inline parameter semantics, we should use inline def foo(inline i: Int) = ???
inline def foo(inline l: Long) = ??? |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 8, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
minimized code
expectation
These should be able to exist in the same scope as
Function0[Int]
andFunction0[Long]
are only required at compiletime.result
error [erasure]:
The text was updated successfully, but these errors were encountered: