aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-10-31 17:33:00 +0100
committerMartin Odersky <odersky@gmail.com>2016-10-31 17:33:00 +0100
commit1dea9916e686adc96df9d7886346af2ed1abe45f (patch)
treee97b68171788ead972962bd17a59fd560296098d /tests/pos
parent01ae7ddfd4956660ed4897f5d2773587f845204c (diff)
downloaddotty-1dea9916e686adc96df9d7886346af2ed1abe45f.tar.gz
dotty-1dea9916e686adc96df9d7886346af2ed1abe45f.tar.bz2
dotty-1dea9916e686adc96df9d7886346af2ed1abe45f.zip
Fix #1637: Future defs are always OK
Drop special mode that handles future defs without which we get DenotationNotDefinedHere errors. In more than a year, this has only turned up false negatives. So I think it's better to drop the check, and the contortions needed to deal with it.
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/i1637.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/pos/i1637.scala b/tests/pos/i1637.scala
new file mode 100644
index 000000000..fa7defb74
--- /dev/null
+++ b/tests/pos/i1637.scala
@@ -0,0 +1,8 @@
+object Main extends App {
+ case class Foo(field: Option[String])
+ val x: PartialFunction[Foo, Int] = { c =>
+ c.field match {
+ case Some(s) => 42
+ }
+ }
+}