-
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.
Improve error messages for overloading errors
We need to show argument lists after the first one if they were used for overloading resolution.
- Loading branch information
Showing
7 changed files
with
54 additions
and
17 deletions.
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
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
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,7 @@ | ||
-- [E134] Type Error: tests/neg/i15287.scala:4:19 ---------------------------------------------------------------------- | ||
4 |@main def Test() = f('c')(2) // error | ||
| ^ | ||
| None of the overloaded alternatives of method f with types | ||
| (x: Char)(min: Boolean, max: Int): String | ||
| (x: Char)(someParam: String): String | ||
| match arguments (('c' : Char))((2 : Int)) |
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,4 @@ | ||
def f(x: Char)(someParam: String): String = "a" | ||
def f(x: Char)(min: Boolean, max: Int = 4): String = "b" | ||
|
||
@main def Test() = f('c')(2) // error |
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
def f(x: Char)(someParam: String): String = "a" | ||
def f(x: Char)(min: Boolean, max: Int = 4): String = "b" | ||
extension (x: Char) | ||
def f(someParam: String): String = "a" | ||
def f(min: Boolean, max: Int = 4): String = "b" | ||
|
||
@main def Test() = | ||
f('c')(false) | ||
'c'.f(true) | ||
'c'.f("a") | ||
|
||
@main def Test() = f('c')(false) |