We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39c49ad commit 1ea5485Copy full SHA for 1ea5485
compiler/src/dotty/tools/dotc/typer/Applications.scala
@@ -1980,7 +1980,9 @@ trait Applications extends Compatibility {
1980
// Reason: People use owner hierarchies to explicitly prioritize, we should not
1981
// break that by changing implicit priority of types. On the other hand we do want
1982
// to comparePrefixes if there is a draw; StringFormaterTest breaks if we don't do that.
1983
- def drawOrOwner = if preferGeneral then ownerScore else 0
+ def drawOrOwner =
1984
+ if preferGeneral && !ctx.mode.is(Mode.OldImplicitResolution) then ownerScore
1985
+ else 0
1986
ownerScore match
1987
case 1 => if winsType1 || !winsType2 then 1 else drawOrOwner
1988
case -1 => if winsType2 || !winsType1 then -1 else drawOrOwner
0 commit comments