diff options
author | Adriaan Moors <adriaan@lightbend.com> | 2016-12-05 10:45:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-05 10:45:09 +0100 |
commit | 2787b47396013a44072fa7321482103b66fbccd3 (patch) | |
tree | a047943567adc5bb10182d9c0c27034f73f23e29 /src/compiler/scala/tools/nsc/transform/Erasure.scala | |
parent | ee1c02b374a4b8a053e9a8b14af5e205afa67e14 (diff) | |
parent | 7bf8ffa155ba66311a904c7eeaca79a70aa7e6f7 (diff) | |
download | scala-2787b47396013a44072fa7321482103b66fbccd3.tar.gz scala-2787b47396013a44072fa7321482103b66fbccd3.tar.bz2 scala-2787b47396013a44072fa7321482103b66fbccd3.zip |
Merge pull request #5570 from adriaanm/t10075
SI-10075 propagate annotations to lazy val's underlying field
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/Erasure.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Erasure.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala index 92accaf9dd..3ce7db35d8 100644 --- a/src/compiler/scala/tools/nsc/transform/Erasure.scala +++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala @@ -1205,7 +1205,9 @@ abstract class Erasure extends InfoTransform treeCopy.ArrayValue( tree1, elemtpt setType specialScalaErasure.applyInArray(elemtpt.tpe), trees map transform).clearType() case DefDef(_, _, _, _, tpt, _) => - fields.dropFieldAnnotationsFromGetter(tree.symbol) // TODO: move this in some post-processing transform in the fields phase? + // TODO: move this in some post-processing transform in the fields phase? + if (fields.symbolAnnotationsTargetFieldAndGetter(tree.symbol)) + fields.dropFieldAnnotationsFromGetter(tree.symbol) try super.transform(tree1).clearType() finally tpt setType specialErasure(tree1.symbol)(tree1.symbol.tpe).resultType |