-
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.
SI-8417 Check adapts of each param section
Previously, adaptations like auto-tupling were checked only on the last param section of an application. This commit runs the sanity check always.
- Loading branch information
Showing
5 changed files
with
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
t8417.scala:5: warning: Adapting argument list by creating a 2-tuple: this may not be what you want. | ||
signature: T.f(x: Any)(y: Any): String | ||
given arguments: "hello", "world" | ||
after adaptation: T.f(("hello", "world"): (String, String)) | ||
def g = f("hello", "world")("holy", "moly") | ||
^ | ||
t8417.scala:5: warning: Adapting argument list by creating a 2-tuple: this may not be what you want. | ||
signature: T.f(x: Any)(y: Any): String | ||
given arguments: "holy", "moly" | ||
after adaptation: T.f(("holy", "moly"): (String, String)) | ||
def g = f("hello", "world")("holy", "moly") | ||
^ | ||
error: No warnings can be incurred under -Xfatal-warnings. | ||
two warnings found | ||
one error found |
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 @@ | ||
-Xfatal-warnings -Ywarn-adapted-args |
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,6 @@ | ||
|
||
|
||
trait T { | ||
def f(x: Any)(y: Any) = "" + x + y | ||
def g = f("hello", "world")("holy", "moly") | ||
} |