diff options
author | Dmitry Petrashko <dark@d-d.me> | 2016-02-08 15:22:30 +0100 |
---|---|---|
committer | Dmitry Petrashko <dark@d-d.me> | 2016-02-08 15:22:30 +0100 |
commit | 8aeee17d2b6f24a0c3cc21f858ff60bc47ab2dc1 (patch) | |
tree | 88cc6bf7eeabfb1a7d1a84fa7b119f49cc132ea1 /tests | |
parent | d0056132485c10e0e408668e177a8452c5112d3b (diff) | |
parent | 37c877d0781547bb5e26c05b1713b7f7b3ef0411 (diff) | |
download | dotty-8aeee17d2b6f24a0c3cc21f858ff60bc47ab2dc1.tar.gz dotty-8aeee17d2b6f24a0c3cc21f858ff60bc47ab2dc1.tar.bz2 dotty-8aeee17d2b6f24a0c3cc21f858ff60bc47ab2dc1.zip |
Merge pull request #1063 from dotty-staging/fix-#803
Handle "missing args" case when expected type is a singleton type.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/i803.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/neg/i803.scala b/tests/neg/i803.scala new file mode 100644 index 000000000..7bae36336 --- /dev/null +++ b/tests/neg/i803.scala @@ -0,0 +1,11 @@ +class Foo{ + val default = this + def foo(a: Int)(b: Foo = default): b.type = b + + def bar(b: Foo = default): b.type = b + val x: Foo = bar() // ok + val x2: Foo = foo(1)() // ok + + val s: Foo = foo(1) // error + val s2: default.type = foo(1) // error +} |