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

Fix #7630: Use weak conformance in overloading resolution #7708

Merged
merged 3 commits into from
Dec 11, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Dec 9, 2019

Following the spec, use weak conformance when determining whether an
overloaded variant is applicable to arguments.

Following the spec, use weak conformance when determining whether an
overloaded variant is applicable to arguments.
@odersky odersky requested a review from sjrd December 9, 2019 16:21
@sjrd
Copy link
Member

sjrd commented Dec 10, 2019

The changes in the tests of harmonization are indeed necessary because Array.apply is overloaded. However, they do constitute a regression in test coverage. We can reclaim the test coverage by using another invariant collection whose apply is not overloaded. For example we can use ArrayBuffer. I suggest to copy-paste the old tests with Arrays and adapting the copy to use ArrayBuffer instead. The ArrayBuffer tests should exhibit the same harmonization behavior as before.

@odersky odersky merged commit 4c76479 into scala:master Dec 11, 2019
@odersky odersky deleted the fix-#7630 branch December 11, 2019 08:41
odersky added a commit that referenced this pull request Jun 20, 2023
…17942)

[skip ci]

Note that weak conformance was not entirely dropped. It is still
applicable to determine *compatibility* of a method call argument to the
parameter type. See #7708.

@odersky Since you asked about it in the big type system PR. ;) FYI the
changes in `TODOreference` and `APPLIEDreference` are part of [our
process to integrate the Reference into the
Spec](#16839).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants