Skip to content

Commit df6232b

Browse files
authored
Merge pull request #5633 from dotty-staging/fix-#5346
Fix #5346: Refine implicit resolution spec
2 parents fcc35d2 + 1206dad commit df6232b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/docs/reference/changed/implicit-resolution.md

+8
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,13 @@ affect implicits on the language level.
7272
most (but not all) divergence errors in Scala 2 would terminate the implicit
7373
search as a whole.
7474

75+
5. Scala-2 gives a lower level of priority to implicit conversions with call-by-name
76+
parameters relative to implicit conversions with call-by-value parameters. Dotty
77+
drops this distinction. So the following code snippet would be ambiguous in Dotty:
78+
79+
implicit def conv1(x: Int): A = new A(x)
80+
implicit def conv2(x: => Int): A = new A(x)
81+
def buzz(y: A) = ???
82+
buzz(1) // error: ambiguous
7583

7684
[//]: # todo: expand with precise rules

0 commit comments

Comments
 (0)