diff options
author | Martin Odersky <odersky@gmail.com> | 2008-05-21 12:29:23 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-05-21 12:29:23 +0000 |
commit | e72ace00e66364b43a272f46b8cb2ebd24739f50 (patch) | |
tree | a97b3e577065c368e9395691654ed32c59beb57f /src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala | |
parent | 00e18ddfec3d3d592b5a140af3a73e4c06a135fe (diff) | |
download | scala-e72ace00e66364b43a272f46b8cb2ebd24739f50.tar.gz scala-e72ace00e66364b43a272f46b8cb2ebd24739f50.tar.bz2 scala-e72ace00e66364b43a272f46b8cb2ebd24739f50.zip |
fixed #605. Added more info on #612
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala index 60f6336cd7..7e8790aacd 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala @@ -40,8 +40,10 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT private var accDefs: List[(Symbol, ListBuffer[Tree])] = List() private val typer = analyzer.newTyper(analyzer.rootContext(unit)) - private def accDefBuf(clazz: Symbol) = - accDefs.dropWhile(_._1 != clazz).head._2 + private def accDefBuf(clazz: Symbol) = accDefs find (_._1 == clazz) match { + case Some((_, buf)) => buf + case None => throw new AssertionError("no acc def buf for "+clazz) + } /* private def transformArgs(args: List[Tree], formals: List[Type]) = { if (!formals.isEmpty && formals.last.symbol == definitions.ByNameParamClass) |