diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-11-02 00:14:50 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-11-02 00:14:50 +0000 |
commit | 62614a6f9f7c335cf53f464ce272ac05979f5647 (patch) | |
tree | d70b2573a1d6559e998211b0e7ca7ef88f945aaa | |
parent | f4e000f7f08086727cec4c810873379de8ab2624 (diff) | |
download | scala-62614a6f9f7c335cf53f464ce272ac05979f5647.tar.gz scala-62614a6f9f7c335cf53f464ce272ac05979f5647.tar.bz2 scala-62614a6f9f7c335cf53f464ce272ac05979f5647.zip |
Closes #3927. No review
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 | ||||
-rw-r--r-- | test/files/pos/t3927.scala | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index bf790301f5..cac788906b 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -410,7 +410,7 @@ trait Namers { self: Analyzer => val vsym = if (!context.owner.isClass) { assert(mods1.isLazy) // if not a field, it has to be a lazy val - owner.newValue(tree.pos, name + "$lzy" ).setFlag(mods1.flags | MUTABLE) + owner.newValue(tree.pos, name + "$lzy" ).setFlag((mods1.flags | MUTABLE) & ~IMPLICIT) } else { val mFlag = if (mods1.isLazy) MUTABLE else 0 val lFlag = if (mods.hasFlag(PRIVATE) && mods.hasFlag(LOCAL)) 0 else LOCAL diff --git a/test/files/pos/t3927.scala b/test/files/pos/t3927.scala new file mode 100644 index 0000000000..c1344febba --- /dev/null +++ b/test/files/pos/t3927.scala @@ -0,0 +1,6 @@ +object A { + def x { + implicit lazy val e: Equiv[Int] = error("") + implicitly[Equiv[Int]] + } +} |