-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retract SynthesizeExtMethodReceiver mode when when going deeper in ov…
…erloading resolution (#18759)
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package dotty.tools.dotc.typer | ||
|
||
object Color: | ||
def apply(): Int = ??? | ||
|
||
extension (u: Unit) | ||
def foo(that: String, f: Int => Int): Int = ??? | ||
def foo(that: Long, f: Int => Int): Int = ??? | ||
|
||
def test = | ||
val c = Color() | ||
().foo("", (_: Int) => c) | ||
().foo("", (_: Int) => Color()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
object Color: | ||
def apply(i: Int): Int = i | ||
|
||
type Plane | ||
|
||
object Plane: | ||
extension (plane: Plane) | ||
def zipWith(that: String, f: Int => Int): Int = ??? | ||
def zipWith(that: Int, f: Int => Int): Int = ??? | ||
|
||
import Plane.zipWith | ||
|
||
def test(p: Plane) = | ||
p.zipWith("", (_: Int) => Color(25)) |