diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-08-06 15:58:44 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-08-06 15:58:44 +0000 |
commit | d4e2058a3a8d49e4b130223ecaf45036f5d9096d (patch) | |
tree | 5d7cb723296ee84d27289c3a8d71b48b62ec9f05 /src | |
parent | 50a178f73e49f2ed52b52f359e74683e06c65b9e (diff) | |
download | scala-d4e2058a3a8d49e4b130223ecaf45036f5d9096d.tar.gz scala-d4e2058a3a8d49e4b130223ecaf45036f5d9096d.tar.bz2 scala-d4e2058a3a8d49e4b130223ecaf45036f5d9096d.zip |
close #3403.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 770daccef0..ddbba00653 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1398,10 +1398,16 @@ trait Typers { self: Analyzer => (if (value.hasAnnotation(BooleanBeanPropertyAttr)) "is" else "get") + nameSuffix val beanGetter = value.owner.info.decl(beanGetterName) + if (beanGetter == NoSymbol) { + // the namer decides wether to generate these symbols or not. at that point, we don't + // have symbolic information yet, so we only look for annotations named "BeanProperty". + unit.error(stat.pos, "implementation limitation: the BeanProperty annotation cannot be used in a type alias or renamed import") + } beanGetter.setAnnotations(memberAnnots(allAnnots, BeanGetterTargetClass)) - if (mods hasFlag MUTABLE) { + if (mods.hasFlag(MUTABLE) && beanGetter != NoSymbol) { val beanSetterName = "set" + nameSuffix val beanSetter = value.owner.info.decl(beanSetterName) + // unlike for the beanGetter, the beanSetter body is generated here. see comment in Namers. gs.append(setterDef(beanSetter, isBean = true)) } } |