summaryrefslogtreecommitdiff
path: root/test/files/pos/t7689.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t7689.scala')
-rw-r--r--test/files/pos/t7689.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/pos/t7689.scala b/test/files/pos/t7689.scala
new file mode 100644
index 0000000000..022e7ab7a0
--- /dev/null
+++ b/test/files/pos/t7689.scala
@@ -0,0 +1,7 @@
+object A {
+ // The default getter must have an explicit return type (List[_] => Int)
+ // This wasn't happening since e28c3edda4. That commit encoded upper/lower
+ // bounds of Any/Nothing as EmptyTree, which were triggering an .isEmpty
+ // check in Namers#TypeTreeSubstitutor
+ def x(f: List[_] => Int = _ => 3) = 9
+}