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

SI-5900 Fix pattern inference regression #3523

Merged
merged 2 commits into from Feb 13, 2014
Merged

Conversation

adriaanm
Copy link
Contributor

Rebase #3514

    qbin/scalac test/pending/neg/t7886b.scala && qbin/scala Test
    java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
        at Test$$anon$1.accept(t7886b.scala:15)
        at Test$.g(t7886b.scala:9)
This commit does not close SI-5900. It only addresses a regression
in 2.11 prereleases caused by SI-7886.

The fix for SI-7886 was incomplete (as shown by the last commit)
and incorrect (as shown by the regression in pos/t5900a.scala and
the fact it ended up inferring type parameters.)

I believe that the key to fixing this problem will be unifying
the inference of case class constructor patterns and extractor
patterns.

I've explored that idea:

  https://gist.github.com/retronym/7704153
  https://github.com/retronym/scala/compare/ticket/5900

But didn't quite get there.
@adriaanm
Copy link
Contributor Author

fixed change to check file, added flags for t6800a

@adriaanm adriaanm self-assigned this Feb 13, 2014
@adriaanm
Copy link
Contributor Author

IDE failure is likely spurious, as it passed before the rebase
retrying here: https://scala-webapps.epfl.ch/jenkins/job/pr-scala-integrate-ide/6155/console

@adriaanm
Copy link
Contributor Author

LGTM

retronym added a commit that referenced this pull request Feb 13, 2014
 Fix pattern inference regression
@retronym retronym merged commit d1c0b35 into scala:master Feb 13, 2014
@adriaanm adriaanm deleted the rebase-3514 branch March 10, 2014 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants