You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_docs/reference/changed-features/implicit-resolution.md
+13-1
Original file line number
Diff line number
Diff line change
@@ -163,8 +163,20 @@ The new rules are as follows: An implicit `a` defined in `A` is more specific th
163
163
164
164
Condition (*) is new. It is necessary to ensure that the defined relation is transitive.
165
165
166
+
[//]: # todo: expand with precise rules
166
167
167
168
169
+
**9.** Given disambiguation has changed. When comparing two givens that both match an expected type, we used to pick the most specific one, in alignment with
170
+
overloading resolution. From Scala 3.5 on, we pick the most general one instead. Compiling with Scala 3.5-migration will print a warning in all cases where the preference has changed. Example:
171
+
```scala
172
+
classA
173
+
classBextendsA
174
+
classCextendsA
168
175
176
+
givenA=A()
177
+
givenB=B()
178
+
givenC=C()
179
+
180
+
summon[A] // was ambiguous, will now return `given_A`
0 commit comments