diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2010-04-12 17:19:59 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2010-04-12 17:19:59 +0000 |
commit | 0beec154209cae7d8aaf34831f8a2bc79af926cc (patch) | |
tree | 9a2b2dacd240837812d21b470379d937c12e9d9e /src/compiler/scala/tools/nsc/typechecker/Unapplies.scala | |
parent | 303d9f812b221abdb1355b43e9b8a1d9be76f56a (diff) | |
download | scala-0beec154209cae7d8aaf34831f8a2bc79af926cc.tar.gz scala-0beec154209cae7d8aaf34831f8a2bc79af926cc.tar.bz2 scala-0beec154209cae7d8aaf34831f8a2bc79af926cc.zip |
Companion objects of case classes extend Abstra...
Companion objects of case classes extend AbstractFunctionN instead of
FunctionN. This saves quite some space, since FunctionN methods are not
re-mixed in for each object.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Unapplies.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Unapplies.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala b/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala index 5ba52f5f06..6f432cc3c4 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala @@ -135,7 +135,7 @@ trait Unapplies extends ast.TreeDSL */ def caseModuleDef(cdef: ClassDef): ModuleDef = { def inheritFromFun = !(cdef.mods hasFlag ABSTRACT) && cdef.tparams.isEmpty && constrParamss(cdef).length == 1 - def createFun = gen.scalaFunctionConstr(constrParamss(cdef).head map (_.tpt), toIdent(cdef)) + def createFun = gen.scalaFunctionConstr(constrParamss(cdef).head map (_.tpt), toIdent(cdef), abstractFun = true) def parents = if (inheritFromFun) List(createFun) else Nil companionModuleDef(cdef, parents ::: List(gen.scalaScalaObjectConstr)) |