Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

SI-7228, bug in subtyping. #2215

Merged
merged 4 commits into from Mar 13, 2013

Conversation

Projects
None yet
2 participants
Contributor

paulp commented Mar 8, 2013

Make isWeakSubType more frequently correct. Simplify widening logic.

Contributor

paulp commented Mar 8, 2013

Review by @retronym.

paulp added some commits Mar 10, 2013

SI-7228, bug in weak subtyping.
Another in the category of bugs which involve narrowing,
widening, mediuming, dealiasing, weakening, normalizing,
denormalizing, supernormalizing, subnormalizing, and
double-bounded supersubnormalizing.

This is probably not the ideal fix, but it is an improvement.
Simplified the widening logic.
Should speak for itself.

Whenever someone changed @switch from an error to a warning,
it broke all the tests which depended on the error. I added
-Xfatal-warnings to a couple which needed it. And one of those
tests was then failing, as it must now since we couldn't get away
with what was being attempted, so I moved it to pending.
Moved some numeric subtyping logic closer to center.
Fixed bug in numeric widening related to continuations,
which enabled simplifying isNumericSubType.

@ghost ghost assigned retronym Mar 11, 2013

Contributor

paulp commented Mar 13, 2013

We will also most likely accept reviews by @adriaanm or @JamesIry.

Fix it-never-happened performance regression.
Diligent reviewer observed that a hot spot was possibly
being made hotter. Reviewer's suggested remedy was a
spectacular bust, but studious observation revealed the news
lash that expensive methods are expensive and we should
avoid calling them if we can.

Put short-circuit test back in front of unapply call.
Now the time spent in unapply is within a few percent.

paulp added a commit that referenced this pull request Mar 13, 2013

@paulp paulp merged commit 79d653a into scala:master Mar 13, 2013

1 check passed

default pr-checkin-per-commit Took 39 min.
Details

@paulp paulp deleted the paulp:issue/7228 branch Mar 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment