diff options
author | Martin Odersky <odersky@gmail.com> | 2016-11-05 13:28:35 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-11-24 16:54:24 +0100 |
commit | d8f5c6c5b57b0688a2024fedc26104540234739c (patch) | |
tree | 06afc63002cc84335d9146fddb9748f0efc4d732 /tests | |
parent | b21f954604d5785515d26238e2c43dc332f9fb5b (diff) | |
download | dotty-d8f5c6c5b57b0688a2024fedc26104540234739c.tar.gz dotty-d8f5c6c5b57b0688a2024fedc26104540234739c.tar.bz2 dotty-d8f5c6c5b57b0688a2024fedc26104540234739c.zip |
Avoid inserting multiple .apply's.
This can lead to stackoverflow, as i1639.scala shows.
Fixes #1639.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/i1639.scala | 10 |
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 +} + |