summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-08-16 11:55:05 -0700
committerJames Iry <jamesiry@gmail.com>2013-08-16 11:55:05 -0700
commit7b351dca8458f599f5fafef4daa307351031ef06 (patch)
tree7ea91d96228efd48b3cb251208ae33049cdefa1f /src/compiler/scala/tools
parent41ccb26bf5ef399035ec9bc702487d5b22815b17 (diff)
parent42e0f73311cfaf0883b85a1a41f400c3eb3cae96 (diff)
downloadscala-7b351dca8458f599f5fafef4daa307351031ef06.tar.gz
scala-7b351dca8458f599f5fafef4daa307351031ef06.tar.bz2
scala-7b351dca8458f599f5fafef4daa307351031ef06.zip
Merge pull request #2838 from retronym/ticket/7716v2.10.3-RC1
SI-7716 Exclude patmat synthetics from bounds checking
Diffstat (limited to 'src/compiler/scala/tools')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index db899b44f9..09c4878b2f 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1826,9 +1826,11 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
case LabelDef(_, _, _) if treeInfo.hasSynthCaseSymbol(result) =>
val old = inPattern
inPattern = true
- val res = deriveLabelDef(result)(transform)
+ val res = deriveLabelDef(result)(transform) // TODO SI-7756 Too broad! The code from the original case body should be fully refchecked!
inPattern = old
res
+ case ValDef(_, _, _, _) if treeInfo.hasSynthCaseSymbol(result) =>
+ deriveValDef(result)(transform) // SI-7716 Don't refcheck the tpt of the synthetic val that holds the selector.
case _ =>
super.transform(result)
}