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

@transient lazy val in traits #1573

Closed
scabug opened this issue Dec 10, 2008 · 5 comments
Closed

@transient lazy val in traits #1573

scabug opened this issue Dec 10, 2008 · 5 comments
Assignees

Comments

@scabug
Copy link

scabug commented Dec 10, 2008

Given the following example:

trait test {
  @transient lazy val traitval: String = ""
}

class testimpl extends test {
  @transient lazy val classval: String = ""
}

This leads to the following fields in the testimpl.class:

  private final String traitval;
  private transient String classval;

But traitval should also be transient, right?

(scala 2.7.2)

@scabug
Copy link
Author

scabug commented Dec 10, 2008

Imported From: https://issues.scala-lang.org/browse/SI-1573?orig=1
Reporter: Jan Kriesten (jkriesten)

@scabug
Copy link
Author

scabug commented Oct 20, 2010

@hubertp said:
Since I am handling all the lazy val bugs, I can take this one as well.

@scabug
Copy link
Author

scabug commented Oct 28, 2010

@hubertp said:
That seems to be fixed in 2.8.0 and current trunk.

@scabug
Copy link
Author

scabug commented Nov 1, 2010

@hubertp said:
(In r23435) Added separate bitmaps for private and transient lazy vals. Closes #3038, #1573. Review by dragos.
I had to fix a couple of initialization issues that checkinit forced me to do and that weren't a problem before because the bitmap was serialized even for @Transitive. For that I needed to change the setters in checkinit so that they also update the bitmap.

@scabug
Copy link
Author

scabug commented Nov 2, 2010

@hubertp said:
This was actually fixed already. It fixes #1574 not #1573.

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

No branches or pull requests

2 participants