aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-12-03 11:40:02 +0100
committerGitHub <noreply@github.com>2016-12-03 11:40:02 +0100
commit9ceed9213497597de8895c83bdf0cc4d5597b150 (patch)
tree5bce4cd1d04ccdb47ae7d69b5071438ab5902d6d /tests
parent8288a3462353de80d8295bbd1f69afe141b2ed4c (diff)
parentd8f5c6c5b57b0688a2024fedc26104540234739c (diff)
downloaddotty-9ceed9213497597de8895c83bdf0cc4d5597b150.tar.gz
dotty-9ceed9213497597de8895c83bdf0cc4d5597b150.tar.bz2
dotty-9ceed9213497597de8895c83bdf0cc4d5597b150.zip
Merge pull request #1658 from dotty-staging/fix-#1639
Fix #1639: Changes around implicits and apply methods
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/i1639.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/neg/i1639.scala b/tests/neg/i1639.scala
new file mode 100644
index 000000000..952cb5ed8
--- /dev/null
+++ b/tests/neg/i1639.scala
@@ -0,0 +1,10 @@
+class Bar {
+ implicit def f(implicit x: String): String = x
+
+ implicitly[String](f) // error: divergent (turn -explaintypes on to see it)
+}
+
+class Foo(implicit val bar: String) {
+ def this() = this("baz") // error: none of the alternatives match arguments
+}
+