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-7596 Curtail overloaded symbols during unpickling #4099

Merged
merged 1 commit into from Nov 21, 2014

Conversation

retronym
Copy link
Member

@retronym retronym commented Nov 6, 2014

In code like:

object O { val x = A; def x(a: Any) = ... }
object P extends O.x.A

The unpickler was using an overloaded symbol for x in the
parent type of P. This led to compilation failures under
separate compilation.

The code that leads to this is in Unpicklers:

def fromName(name: Name) = name.toTermName match {
  case nme.ROOT     => loadingMirror.RootClass
  case nme.ROOTPKG  => loadingMirror.RootPackage
  case _            => adjust(owner.info.decl(name))
}

This commit filters the overloaded symbol based its stability
unpickling a singleton type. That seemed a slightly safer place
than in fromName.

Resubmission of #2664 incorporating review from @gkossakowski.

Review by @gkossakowski :)

In code like:

    object O { val x = A; def x(a: Any) = ... }
    object P extends O.x.A

The unpickler was using an overloaded symbol for `x` in the
parent type of `P`. This led to compilation failures under
separate compilation.

The code that leads to this is in `Unpicklers`:

    def fromName(name: Name) = name.toTermName match {
      case nme.ROOT     => loadingMirror.RootClass
      case nme.ROOTPKG  => loadingMirror.RootPackage
      case _            => adjust(owner.info.decl(name))
    }

This commit filters the overloaded symbol based its stability
unpickling a singleton type. That seemed a slightly safer place
than in `fromName`.
@scala-jenkins scala-jenkins added this to the 2.11.5 milestone Nov 6, 2014
@retronym
Copy link
Member Author

retronym commented Nov 6, 2014

PLS REBUILD ALL

@scala-jenkins
Copy link

(kitty-note-to-self: ignore 61949437)
🐱 Roger! Rebuilding pr-scala for 652abba. 🚨

@retronym
Copy link
Member Author

retronym commented Nov 6, 2014

PLS REBUILD ALL

I've taken three Jenkins nodes offline (typesafe-a2-*) to try to restore stability to PR validation.

@scala-jenkins
Copy link

(kitty-note-to-self: ignore 61974454)
🐱 Roger! Rebuilding pr-scala for 652abba. 🚨

@gkossakowski
Copy link
Member

LGTM

This one must be coming from X-files unit. :)

gkossakowski added a commit that referenced this pull request Nov 21, 2014
SI-7596 Curtail overloaded symbols during unpickling
@gkossakowski gkossakowski merged commit 3f08b09 into scala:2.11.x Nov 21, 2014
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