-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid SAM with param-dependent result crashing
- Loading branch information
Showing
5 changed files
with
40 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- [E081] Type Error: tests/neg/i17183.scala:11:24 --------------------------------------------------------------------- | ||
11 |def test = Context(f = (_, _) => ???) // error // error | ||
| ^ | ||
| Missing parameter type | ||
| | ||
| I could not infer the type of the parameter _$1 of expanded function: | ||
| (_$1, _$2) => ???. | ||
-- [E081] Type Error: tests/neg/i17183.scala:11:27 --------------------------------------------------------------------- | ||
11 |def test = Context(f = (_, _) => ???) // error // error | ||
| ^ | ||
| Missing parameter type | ||
| | ||
| I could not infer the type of the parameter _$2 of expanded function: | ||
| (_$1, _$2) => ???. |
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,11 @@ | ||
trait Dependency { | ||
trait More | ||
} | ||
|
||
trait MyFunc { | ||
def apply(a: Int, b: String)(using dep: Dependency, more: dep.More): String | ||
} | ||
|
||
case class Context(f: MyFunc) | ||
|
||
def test = Context(f = (_, _) => ???) // error // error |