-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply insertion for nilary case companion
- Loading branch information
Showing
4 changed files
with
33 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
t3664c.scala:9: error: type mismatch; | ||
t3664c.scala:13: error: type mismatch; | ||
found : C.type | ||
required: ((Int, Int, Int)) => C | ||
def f(xs: List[(Int, Int, Int)]): List[C] = xs.map(C) // hard error | ||
^ | ||
t3664c.scala:11: error: type mismatch; | ||
t3664c.scala:15: error: type mismatch; | ||
found : ((Int, Int)) => C | ||
required: ((Int, Int, Int)) => C | ||
def g(xs: List[(Int, Int, Int)]): List[C] = xs.map(C.tupled) // hard error | ||
^ | ||
2 errors | ||
t3664c.scala:17: error: type mismatch; | ||
found : D.type | ||
required: ((Int, Int)) => D | ||
def d(xs: List[(Int, Int)]): List[D] = xs.map(D) // hard error | ||
^ | ||
t3664c.scala:19: warning: An unapplied 0-arity method was eta-expanded (due to the expected type () => E), rather than applied to `()`. | ||
Write E.apply() to invoke method apply, or change the expected type. | ||
val e: () => E = E | ||
^ | ||
t3664c.scala:19: warning: The method `apply` is inserted. The auto insertion will be deprecated, please write `E.apply` explicitly. | ||
val e: () => E = E | ||
^ | ||
2 warnings | ||
3 errors |
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