Skip to content

Commit

Permalink
Disable transient field checks in checkinit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandar Prokopec committed Mar 14, 2012
1 parent 0c9ffe5 commit 9e6ffde
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/scala/tools/nsc/transform/Mixin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL {
* nor do they have a setter (not if they are vals anyway). The usual
* logic for setting bitmaps does therefor not work for such fields.
* That's why they are excluded.
* Note: The `checkinit` option does not check if transient fields are initialized.
*/
private def needsInitFlag(sym: Symbol) = (
settings.checkInit.value
Expand All @@ -95,6 +96,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL {
&& !sym.accessed.hasFlag(PRESUPER)
&& !sym.isOuterAccessor
&& !(sym.owner isSubClass DelayedInitClass)
&& !(sym hasAnnotation TransientAttr)
)

/** Maps all parts of this type that refer to implementation classes to
Expand Down

0 comments on commit 9e6ffde

Please sign in to comment.