diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala | 4 |
1 files changed, 4 insertions, 0 deletions
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 |