Skip to content

Commit 50e1fbe

Browse files
committed
Fix rebase breakage
1 parent ad2c2f9 commit 50e1fbe

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,7 @@ trait Applications extends Compatibility {
17201720
* a. always as good as a method or a polymorphic method.
17211721
* b. as good as a member of any other type `tp2` is `asGoodValueType(tp1, tp2) = true`
17221722
*/
1723-
def isAsGood(alt1: TermRef, tp1: Type, alt2: TermRef, tp2: Type): Boolean = trace(i"isAsSpecific $tp1 $tp2", overload) {
1723+
def isAsGood(alt1: TermRef, tp1: Type, alt2: TermRef, tp2: Type): Boolean = trace(i"isAsGood $tp1 $tp2", overload) {
17241724
tp1 match
17251725
case tp1: MethodType => // (1)
17261726
tp1.paramInfos.isEmpty && tp2.isInstanceOf[LambdaType]
@@ -1876,8 +1876,8 @@ trait Applications extends Compatibility {
18761876
def comparePrefixes =
18771877
val pre1 = widenPrefix(alt1)
18781878
val pre2 = widenPrefix(alt2)
1879-
val winsPrefix1 = isAsSpecificValueType(pre1, pre2)
1880-
val winsPrefix2 = isAsSpecificValueType(pre2, pre1)
1879+
val winsPrefix1 = isAsGoodValueType(pre1, pre2)
1880+
val winsPrefix2 = isAsGoodValueType(pre2, pre1)
18811881
if winsPrefix1 == winsPrefix2 then 0
18821882
else if winsPrefix1 then 1
18831883
else -1

tests/neg/cb-companion-leaks.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- [E194] Type Error: tests/neg/cb-companion-leaks.scala:9:23 ----------------------------------------------------------
1+
-- [E195] Type Error: tests/neg/cb-companion-leaks.scala:9:23 ----------------------------------------------------------
22
9 | def foo[A: {C, D}] = A // error
33
| ^
44
| context bound companion value A cannot be used as a value
@@ -20,7 +20,7 @@
2020
| companion value with the (term-)name `A`. However, these context bound companions
2121
| are not values themselves, they can only be referred to in selections.
2222
---------------------------------------------------------------------------------------------------------------------
23-
-- [E194] Type Error: tests/neg/cb-companion-leaks.scala:13:10 ---------------------------------------------------------
23+
-- [E195] Type Error: tests/neg/cb-companion-leaks.scala:13:10 ---------------------------------------------------------
2424
13 | val x = A // error
2525
| ^
2626
| context bound companion value A cannot be used as a value
@@ -42,7 +42,7 @@
4242
| companion value with the (term-)name `A`. However, these context bound companions
4343
| are not values themselves, they can only be referred to in selections.
4444
--------------------------------------------------------------------------------------------------------------------
45-
-- [E194] Type Error: tests/neg/cb-companion-leaks.scala:15:9 ----------------------------------------------------------
45+
-- [E195] Type Error: tests/neg/cb-companion-leaks.scala:15:9 ----------------------------------------------------------
4646
15 | val y: A.type = ??? // error
4747
| ^
4848
| context bound companion value A cannot be used as a value

0 commit comments

Comments
 (0)