We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The "warn-adapted-args" compiler argument only triggers on the last argument list (2.11.0-M7 REPL session):
scala> :settings +Ywarn-adapted-args scala> def a(x: Any) { | println(x) | } a: (x: Any)Unit scala> a(1, "String", "Hello") <console>:9: warning: Adapting argument list by creating a 3-tuple: this may not be what you want. signature: a(x: Any): Unit given arguments: 1, "String", "Hello" after adaptation: a((1, "String", "Hello"): (Int, String, String)) a(1, "String", "Hello") ^ (1,String,Hello) scala> def a2(x: Any)(y: Any) { | println(x) | } a2: (x: Any)(y: Any)Unit scala> a2(1, "String", "Hello")("World") (1,String,Hello) scala> a2(1)("String", "Hello", "World") <console>:9: warning: Adapting argument list by creating a 3-tuple: this may not be what you want. signature: a2(x: Any)(y: Any): Unit given arguments: "String", "Hello", "World" after adaptation: a2(("String", "Hello", "World"): (String, String, String)) a2(1)("String", "Hello", "World") ^ 1
It would be useful if the warning triggered if any of the argument lists in a method declaration requires adaption. See https://groups.google.com/forum/#!topic/scala-language/E-YzZBY9510
Happy to attempt to put together a PR for this, but some pointers as to where to look would be appreciated!
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-8417?orig=1 Reporter: @demobox Affected Versions: 2.11.0-RC1
Sorry, something went wrong.
@demobox said: /cc @som-snytt
@som-snytt said: scala/scala#5643
@demobox said (edited on Jan 17, 2017 6:45:14 AM UTC):
scala/scala#5643
Great - many thanks, A.P.!
som-snytt
No branches or pull requests
The "warn-adapted-args" compiler argument only triggers on the last argument list (2.11.0-M7 REPL session):
It would be useful if the warning triggered if any of the argument lists in a method declaration requires adaption. See https://groups.google.com/forum/#!topic/scala-language/E-YzZBY9510
Happy to attempt to put together a PR for this, but some pointers as to where to look would be appreciated!
The text was updated successfully, but these errors were encountered: