diff options
author | Paul Phillips <paulp@improving.org> | 2011-10-22 21:09:11 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-10-22 21:09:11 +0000 |
commit | 290f687fb6ab91b6aef62d871036ddc3829f12b4 (patch) | |
tree | a55663699fa69315ba4e640252cc6694cbd805d6 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | 0c97d8c73fdf4e1dd33ee98ea2e14bc51388bb5f (diff) | |
download | scala-290f687fb6ab91b6aef62d871036ddc3829f12b4.tar.gz scala-290f687fb6ab91b6aef62d871036ddc3829f12b4.tar.bz2 scala-290f687fb6ab91b6aef62d871036ddc3829f12b4.zip |
Overhaul of Namers continues.
Starting to see a glimmer of the other side now. I nudged a few things
into more sensible places. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index e2e23f6f7e..cdcc3ad044 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1455,8 +1455,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { val setter = getter.setter(value.owner) gs.append(setterDef(setter)) } - if (!forMSIL && (value.hasAnnotation(BeanPropertyAttr) || - value.hasAnnotation(BooleanBeanPropertyAttr))) { + if (!forMSIL && hasBeanAnnotation(value)) { val nameSuffix = name.toString.capitalize val beanGetterName = (if (value.hasAnnotation(BooleanBeanPropertyAttr)) "is" else "get") + @@ -3019,6 +3018,20 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { } (new Deskolemizer).substitute() } + /** Convert to corresponding type parameters all skolems of method + * parameters which appear in `tparams`. + */ + def deskolemizeTypeParams(tparams: List[Symbol])(tp: Type): Type = { + class DeSkolemizeMap extends TypeMap { + def apply(tp: Type): Type = tp match { + case TypeRef(pre, sym, args) if sym.isTypeSkolem && (tparams contains sym.deSkolemize) => + mapOver(typeRef(NoPrefix, sym.deSkolemize, args)) + case _ => + mapOver(tp) + } + } + new DeSkolemizeMap mapOver tp + } protected def typedExistentialTypeTree(tree: ExistentialTypeTree, mode: Int): Tree = { for (wc <- tree.whereClauses) |