From 115eede127ad96f65b5aa3943e7a2334d75c7d6b Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 24 Jul 2012 10:13:22 +0200 Subject: SI-5897 don't check sensicality in match the pattern matching analysis should be more precise anyway (don't warn twice) --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 6912e5354f..254a2f2376 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1541,7 +1541,8 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R transform(qual) case Apply(fn, args) => - checkSensible(tree.pos, fn, args) + // sensicality should be subsumed by the unreachability/exhaustivity/irrefutability analyses in the pattern matcher + if (!inPattern) checkSensible(tree.pos, fn, args) currentApplication = tree tree } -- cgit v1.2.3