diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 3 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxedObjectArray.scala | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 0ecfeb9b3e..f63ebed3a4 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -1621,7 +1621,8 @@ trait Parsers requires SyntaxAnalyzer { val implicitViews = new ListBuffer[Tree]; val tparams = typeParamClauseOpt(name, implicitViews); //if (mods.hasFlag(Flags.CASE) && in.token != LPAREN) accept(LPAREN); - val vparamss = paramClauses(name, implicitViews.toList, mods.hasFlag(Flags.CASE)); + val vparamss = if (mods.hasFlag(Flags.TRAIT)) List() + else paramClauses(name, implicitViews.toList, mods.hasFlag(Flags.CASE)); val thistpe = requiresTypeOpt(); val template = classTemplate(mods, name, vparamss); val mods1 = if (mods.hasFlag(Flags.TRAIT) && (template.body forall treeInfo.isInterfaceMember)) diff --git a/src/library/scala/runtime/BoxedObjectArray.scala b/src/library/scala/runtime/BoxedObjectArray.scala index 6563e12e4b..98a4cbc060 100644 --- a/src/library/scala/runtime/BoxedObjectArray.scala +++ b/src/library/scala/runtime/BoxedObjectArray.scala @@ -31,7 +31,7 @@ final class BoxedObjectArray(val value: Array[Object]) extends BoxedArray { override def hashCode(): Int = value.hashCode(); - private def create(length: int): Array[Object] = { + private def create(length: Int): Array[Object] = { val elemClass = value.getClass().getComponentType() java.lang.reflect.Array.newInstance(elemClass, length).asInstanceOf[Array[Object]] } |