aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorOlivier Blanvillain <olivier.blanvillain@gmail.com>2016-09-09 16:56:01 +0200
committerOlivier Blanvillain <olivier.blanvillain@gmail.com>2016-09-13 15:59:39 +0200
commitfe09615739dbc57ef068b4d04a2223ae0bb88eaa (patch)
tree899eb8aea1337673e9bb13c37939fce30df72d13 /tests/pos
parent75f4400a738da5e436ed65d6ba8c7fa2d8f4faee (diff)
downloaddotty-fe09615739dbc57ef068b4d04a2223ae0bb88eaa.tar.gz
dotty-fe09615739dbc57ef068b4d04a2223ae0bb88eaa.tar.bz2
dotty-fe09615739dbc57ef068b4d04a2223ae0bb88eaa.zip
Partially fix #1500: Implicit search breaks at a certain depth
The issue fixed here was introduced by 71027f15. The added `csyms.isEmpty` condition on `case nil =>` is always true, which is clearely a bug. t1500c still fails with covariant (or contravariant) type parameters on `::`, but this seams to be a more complicated issue involving the typer.
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/t1500a.scala28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/pos/t1500a.scala b/tests/pos/t1500a.scala
new file mode 100644
index 000000000..adf46329a
--- /dev/null
+++ b/tests/pos/t1500a.scala
@@ -0,0 +1,28 @@
+trait Step0
+trait Step1
+trait Step2
+trait Step3
+trait Step4
+trait Step5
+trait Step6
+
+object Steps {
+ implicit val Step0: Step0 = new Step0 {}
+ implicit def Step1(implicit p: Step0): Step1 = new Step1 {}
+ implicit def Step2(implicit p: Step1): Step2 = new Step2 {}
+ implicit def Step3(implicit p: Step2): Step3 = new Step3 {}
+ implicit def Step4(implicit p: Step3): Step4 = new Step4 {}
+ implicit def Step5(implicit p: Step4): Step5 = new Step5 {}
+ implicit def Step6(implicit p: Step5): Step6 = new Step6 {}
+}
+
+object StepsTest {
+ import Steps._
+
+ implicitly[Step0]
+ implicitly[Step1]
+ implicitly[Step2]
+ implicitly[Step3]
+ implicitly[Step4]
+ implicitly[Step6]
+}