Skip to content

Incorrect unpickling of path-dependent types #982

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

Closed
VladimirNik opened this issue Nov 27, 2015 · 0 comments
Closed

Incorrect unpickling of path-dependent types #982

VladimirNik opened this issue Nov 27, 2015 · 0 comments

Comments

@VladimirNik
Copy link
Contributor

In some cases after unpickling path-dependent types become type projections. Example:

trait Z {
  type Q
  def test: Q
}
class X(val x: Z)
class Y(x: Z) extends X(x) {
  x.test
}

x.test before pickling:

<<Y.this.x:=> Z>.test:=> Y.this.x.Q>

x.test after unpickling:

<<Y.this.x:=> Z>.test:=> Z#Q>
@VladimirNik VladimirNik self-assigned this Nov 27, 2015
VladimirNik added a commit to dotty-staging/dotty that referenced this issue Nov 27, 2015
Pickling/unpickling of STABLE modifier allows to fix problem with
unpickling of path-dependent types (scala#982)
VladimirNik added a commit to dotty-staging/dotty that referenced this issue Nov 27, 2015
Pickling/unpickling of STABLE modifier allows to fix problem with
unpickling of path-dependent types (scala#982)

If during compilation ValDef was substituded with DefDef, and there
is a method invocation on such substituded ValDef that should result
in a value of path-dependent type, stable modifier shows that
path-dependent type can be used for such term.
VladimirNik added a commit to dotty-staging/dotty that referenced this issue Nov 27, 2015
Pickling/unpickling of STABLE modifier allows to fix problem with
unpickling of path-dependent types (scala#982)

If during compilation ValDef was substituted with DefDef, and there
is an invocation on such substituted ValDef that should result
in a value of path-dependent type, stable modifier shows that
path-dependent type can be used for such term.
VladimirNik added a commit to dotty-staging/dotty that referenced this issue Nov 27, 2015
Pickling/unpickling of STABLE modifier allows to fix problem with
unpickling of path-dependent types (scala#982)

If during compilation ValDef was substituted with DefDef, and there
is an invocation on such substituted ValDef that should result
in a value of path-dependent type, stable modifier signalizes that
path-dependent type should be used for such term.
VladimirNik added a commit to dotty-staging/dotty that referenced this issue Nov 27, 2015
Pickling/unpickling of STABLE modifier allows to fix problem with
unpickling of path-dependent types (scala#982)
DarkDimius pushed a commit to dotty-linker/dotty that referenced this issue May 9, 2016
Pickling/unpickling of STABLE modifier allows to fix problem with
unpickling of path-dependent types (scala#982)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant