From 7806112e43776fc812c93ec9cabd5cbd1953c4a6 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 6 Dec 2010 22:39:22 +0000 Subject: Don't transform patterns during superaccessors:... Don't transform patterns during superaccessors: the matcher can't deal with funny trees. Closes #4062, review by dragos. --- src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala index c1a44dba93..5d19d469b5 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala @@ -144,6 +144,10 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT else tree try tree match { + // Don't transform patterns or strange trees will reach the matcher (ticket #4062) + case CaseDef(pat, guard, body) => + treeCopy.CaseDef(tree, pat, transform(guard), transform(body)) + case ClassDef(_, _, _, _) => checkCompanionNameClashes(sym) val decls = sym.info.decls -- cgit v1.2.3