summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-02-04 21:18:19 -0800
committerPaul Phillips <paulp@improving.org>2012-02-04 21:20:40 -0800
commit84bf74e3346a5b42199572930d303900a3675b22 (patch)
treeaf093799078fd9cdab049e699ae7092129817672 /src
parent6ba9411c7c6abdbd907ca93208ac58b474b201d0 (diff)
downloadscala-84bf74e3346a5b42199572930d303900a3675b22.tar.gz
scala-84bf74e3346a5b42199572930d303900a3675b22.tar.bz2
scala-84bf74e3346a5b42199572930d303900a3675b22.zip
Fixed all but one of the scalap tests.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index f7401c813a..97c264fa4b 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -2764,13 +2764,11 @@ self =>
Template(parents0, self, body)
}
else {
- val parents = (
- if (parents0.isEmpty) List(scalaAnyRefConstr)
- /*if (!isInterface(mods, body) && !isScalaArray(name))
- parents0 /* :+ scalaScalaObjectConstr*/
- else*/
- else parents0
- ) ++ caseParents()
+ val casePs = caseParents()
+ val parents = parents0 match {
+ case Nil if casePs.isEmpty => List(scalaAnyRefConstr)
+ case _ => parents0 ++ casePs
+ }
Template(parents, self, constrMods, vparamss, argss, body, o2p(tstart))
}
}