diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2007-08-31 15:30:33 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2007-08-31 15:30:33 +0000 |
commit | 26109cdb6b024a09783e9ff1e0bb7ac64597a689 (patch) | |
tree | 2d63c60be0fa2b969405f838f0be681a1412592e /src/compiler | |
parent | 7c7ea4b57e070e0146c835ed61b52d69cda85c62 (diff) | |
download | scala-26109cdb6b024a09783e9ff1e0bb7ac64597a689.tar.gz scala-26109cdb6b024a09783e9ff1e0bb7ac64597a689.tar.bz2 scala-26109cdb6b024a09783e9ff1e0bb7ac64597a689.zip |
Fixed crash in lazy traits (ticket #39).
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Mixin.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala index e4cd3c4f43..5ba3db1afa 100644 --- a/src/compiler/scala/tools/nsc/transform/Mixin.scala +++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala @@ -564,7 +564,7 @@ abstract class Mixin extends InfoTransform { If(mkTest(mask), gen.mkSynchronized(gen.mkAttributedThis(clazz), If(mkTest(mask), - Block(List(gen.mkSynchronized(gen.mkAttributedThis(clazz), init), + Block(List(init, mkSetFlag(bitmapSym, mask)), Literal(Constant(()))), EmptyTree)), @@ -612,7 +612,7 @@ abstract class Mixin extends InfoTransform { // if it is a mixed-in lazy value, complete the accessor if (sym.hasFlag(LAZY) && sym.isGetter) { val assign = - Assign(gen.mkAttributedRef(sym.accessed), + Assign(Select(This(sym.accessed.owner), sym.accessed) /*gen.mkAttributedRef(sym.accessed)*/, Apply(staticRef(initializer(sym)), gen.mkAttributedThis(clazz) :: Nil)) val rhs1 = mkLazyDef(clazz, assign, sym.accessed, offset) |