summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-11-19 08:39:59 +0000
committerPaul Phillips <paulp@improving.org>2011-11-19 08:39:59 +0000
commit214c145943ac2c6bf37bd40f5e07e225350201c5 (patch)
tree9ae086954e4e855e9561bbef0b812d34c82d967c /src/library
parent334872e33be8385678697f3d670c8102d38cdca7 (diff)
downloadscala-214c145943ac2c6bf37bd40f5e07e225350201c5.tar.gz
scala-214c145943ac2c6bf37bd40f5e07e225350201c5.tar.bz2
scala-214c145943ac2c6bf37bd40f5e07e225350201c5.zip
Cleanups in TypeApply creation and casting.
There's every hint that it's a requirement that a TypeApply have non-empty typeArgs, but testing for and handling the empty condition is done irregularly. Made a mkTypeApply which handles the isEmpty case (returning "fun" unchanged.) Also unified most of the variations of casts under one umbrella. Review by moors.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/reflect/api/Trees.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/library/scala/reflect/api/Trees.scala b/src/library/scala/reflect/api/Trees.scala
index 3e5dae739d..64793fb303 100644
--- a/src/library/scala/reflect/api/Trees.scala
+++ b/src/library/scala/reflect/api/Trees.scala
@@ -496,7 +496,10 @@ trait Trees /*extends reflect.generic.Trees*/ { self: Universe =>
}
/** Explicit type application.
- */
+ * @PP: All signs point toward it being a requirement that args.nonEmpty,
+ * but I can't find that explicitly stated anywhere. Unless your last name
+ * is odersky, you should probably treat it as true.
+ */
case class TypeApply(fun: Tree, args: List[Tree])
extends GenericApply {
override def symbol: Symbol = fun.symbol