Skip to content

Fix #2437: Drop erroneous case in Pickler #2510

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 3 commits into from
May 29, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 23, 2017

The case was a left-over from when we did not pickle
types as trees. There was a special case to record the symbol
of a bound type variable. This is no longer needed as we now
pickle the full tree that defines the symbol.

@smarter
Copy link
Member

smarter commented May 23, 2017

The testcase from the issue is missing, otherwise LGTM, thanks!

@smarter
Copy link
Member

smarter commented May 23, 2017

Bintray is having issue right now which mean our CI is useless unfortunately: https://bintray.statuspage.io/ " Investigating - We are experiencing intermittent download issues. We are currently investigating and will update as soon as the issue is resolved. "

@smarter
Copy link
Member

smarter commented May 23, 2017

One test failed (tests/patmat/exhausting.scala), here's a minimization:

class Foo[T]
object Test {
  def foo[T](arg: Foo[T]) = arg match {
    case bla: Foo[_] =>
  }
}

If you replace Foo[_] by Foo[t] it doesn't crash. Stack trace:

Exception in thread "main" java.lang.AssertionError: assertion failed: unresolved symbols: type _ when pickling try/i2437b.scala
        at scala.Predef$.assert(Predef.scala:170)
        at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:587)
        at dotty.tools.dotc.transform.Pickler$$anonfun$run$2$$anonfun$apply$1.apply(Pickler.scala:52)
        at dotty.tools.dotc.transform.Pickler$$anonfun$run$2$$anonfun$apply$1.apply(Pickler.scala:45)
        at scala.collection.immutable.List.foreach(List.scala:392)
        at dotty.tools.dotc.transform.Pickler$$anonfun$run$2.apply(Pickler.scala:45)
        at dotty.tools.dotc.transform.Pickler$$anonfun$run$2.apply(Pickler.scala:44)
        at scala.collection.immutable.List.foreach(List.scala:392)
        at dotty.tools.dotc.transform.Pickler.run(Pickler.scala:44)
        at dotty.tools.dotc.core.Phases$Phase$$anonfun$runOn$1.apply(Phases.scala:283)
        at dotty.tools.dotc.core.Phases$Phase$$anonfun$runOn$1.apply(Phases.scala:281)
        at scala.collection.immutable.List.map(List.scala:284)
        at dotty.tools.dotc.core.Phases$Phase$class.runOn(Phases.scala:281)
        at dotty.tools.dotc.transform.Pickler.runOn(Pickler.scala:76)
        at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:82)
        at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:79)
        at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
        at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
        at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply$mcV$sp(Run.scala:79)
        at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67)
        at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67)
        at dotty.tools.dotc.util.Stats$.monitorHeartBeat(Stats.scala:76)
        at dotty.tools.dotc.Run.compileUnits(Run.scala:67)
        at dotty.tools.dotc.Run.compileSources(Run.scala:64)
        at dotty.tools.dotc.Run.compile(Run.scala:48)
        at dotty.tools.dotc.Driver.doCompile(Driver.scala:26)
        at dotty.tools.dotc.Driver.process(Driver.scala:124)
        at dotty.tools.dotc.Driver.process(Driver.scala:93)
        at dotty.tools.dotc.Driver.process(Driver.scala:105)
        at dotty.tools.dotc.Driver.main(Driver.scala:132)
        at dotty.tools.dotc.Main.main(Main.scala)

@smarter
Copy link
Member

smarter commented May 29, 2017

This is now missing testcases.

@smarter
Copy link
Member

smarter commented May 29, 2017

Rebased and added testcases.

@smarter smarter merged commit d207e7e into scala:master May 29, 2017
DarkDimius added a commit to dotty-staging/dotty that referenced this pull request Aug 4, 2017
binds are "shared" as type trees would be shared,
see scala#2510

But they are not type trees, as you can't have them inside TypeApply.
See i2944a.scala.
nicolasstucki pushed a commit to dotty-staging/dotty that referenced this pull request Sep 21, 2017
binds are "shared" as type trees would be shared,
see scala#2510

But they are not type trees, as you can't have them inside TypeApply.
See i2944a.scala.
@allanrenucci allanrenucci deleted the fix-#2437 branch December 14, 2017 19:18
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.

2 participants