diff options
author | Paul Phillips <paulp@improving.org> | 2010-07-02 01:01:44 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-07-02 01:01:44 +0000 |
commit | 57b7e442af26e07dc2411f46b0a8103dfe054101 (patch) | |
tree | fa27f49579d3e2a62781af86f148eb1d4f33fcce /src/compiler/scala/tools/nsc/ast/TreeInfo.scala | |
parent | 9421f2ecaf85cb2e409e73dad7554e466303c284 (diff) | |
download | scala-57b7e442af26e07dc2411f46b0a8103dfe054101.tar.gz scala-57b7e442af26e07dc2411f46b0a8103dfe054101.tar.bz2 scala-57b7e442af26e07dc2411f46b0a8103dfe054101.zip |
Fail more gracefully on > 22 case class paramet...
Fail more gracefully on > 22 case class parameters. Closes #3631, no
review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/TreeInfo.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/TreeInfo.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeInfo.scala b/src/compiler/scala/tools/nsc/ast/TreeInfo.scala index f21b1b20ff..46ddf7b24b 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeInfo.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeInfo.scala @@ -151,6 +151,12 @@ abstract class TreeInfo { case _ :: stats1 => firstConstructor(stats1) } + /** The arguments to the first constructor in `stats'. */ + def firstConstructorArgs(stats: List[Tree]): List[Tree] = firstConstructor(stats) match { + case DefDef(_, _, _, args :: _, _, _) => args + case _ => Nil + } + /** The value definitions marked PRESUPER in this statement sequence */ def preSuperFields(stats: List[Tree]): List[ValDef] = for (vdef @ ValDef(mods, _, _, _) <- stats if mods hasFlag PRESUPER) yield vdef |