-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix bug in erasedLub leading to incorrect signatures #2070
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before this commit, the added testcase failed in a strange way: 14 | def bla(foo: Foo) = orElse2(identity).apply(foo) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |value of type <nonsensical><notype></nonsensical> does not take parameters This happened because the TermRef for the apply method had an incorrect signature, therefore its underlying type was NoType. According to the documentation of `erasedLub`, the erasure should be: "a common superclass or trait S of the argument classes, with the following two properties: S is minimal: no other common superclass or trait derives from S] S is last : in the linearization of the first argument type `tp1` there are no minimal common superclasses or traits that come after S. (the reason to pick last is that we prefer classes over traits that way)." I'm not convinced that the implementation satisfies either of these two properties, but this commit at least makes S closer to being minimal by making sure that the last best candidate never derives from it.
The change LGTM. In the comment leading up to it, there's a stray |
I'll merge and piggyback the comment on some future PR. |
Ok, I think we should also take a closer look to make sure the comment
matches the implementation.
…On Mar 9, 2017 14:08, "odersky" ***@***.***> wrote:
Merged #2070 <#2070>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2070 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD3xgerMRdMzUeTxLKs-BiskyiI0vROks5rj_nIgaJpZM4MXXAl>
.
|
smarter
added a commit
to dotty-staging/dotty
that referenced
this pull request
Mar 12, 2017
This wasn't done before because dotty could not compile dottydoc, this got fixed by PRs scala#2070 and scala#2076.
smarter
added a commit
to dotty-staging/dotty
that referenced
this pull request
Mar 12, 2017
This wasn't done before because dotty could not compile dottydoc, this got fixed by PRs scala#2070 and scala#2076.
smarter
added a commit
to dotty-staging/dotty
that referenced
this pull request
Mar 13, 2017
This wasn't done before because dotty could not compile dottydoc, this got fixed by PRs scala#2070 and scala#2076.
smarter
added a commit
to dotty-staging/dotty
that referenced
this pull request
Mar 13, 2017
This wasn't done before because dotty could not compile dottydoc, this got fixed by PRs scala#2070 and scala#2076, and the previous commit fixed a miscompilation issue.
smarter
added a commit
to dotty-staging/dotty
that referenced
this pull request
Mar 14, 2017
This wasn't done before because dotty could not compile dottydoc, this got fixed by PRs scala#2070 and scala#2076, and the previous commit fixed a miscompilation issue.
smarter
added a commit
to dotty-staging/dotty
that referenced
this pull request
Mar 15, 2017
This wasn't done before because dotty could not compile dottydoc, this got fixed by PRs scala#2070 and scala#2076, and the previous commit fixed a miscompilation issue.
smarter
added a commit
to dotty-staging/dotty
that referenced
this pull request
Mar 15, 2017
This wasn't done before because dotty could not compile dottydoc, this got fixed by PRs scala#2070 and scala#2076, and the previous commit fixed a miscompilation issue.
smarter
added a commit
to dotty-staging/dotty
that referenced
this pull request
Mar 15, 2017
This wasn't done before because dotty could not compile dottydoc, this got fixed by PRs scala#2070 and scala#2076, and the previous commit fixed a miscompilation issue.
smarter
added a commit
to dotty-staging/dotty
that referenced
this pull request
Mar 16, 2017
This wasn't done before because dotty could not compile dottydoc, this got fixed by PRs scala#2070 and scala#2076, and the previous commit fixed a miscompilation issue.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this commit, the added testcase failed in a strange way:
This happened because the TermRef for the apply method had an incorrect
signature (with a result type of
Object
instead ofFoo
), therefore its underlying type was NoType.According to the documentation of
erasedLub
, the erasure should be:I'm not convinced that the implementation satisfies either of these two
properties, but this commit at least makes S closer to being minimal by
making sure that it does not derive from the last seen best candidate never derives from it.