SI-7294 Towards finality for TupleN#2299
Merged
paulp merged 3 commits intoscala:masterfrom Mar 25, 2013
Merged
Conversation
Contributor
|
@ijuma which are the too-noisy ones? I would like to move all the warning configuration into a config file and you can enable/disable them at will, it's just one of those tasks which is full of tedium. |
Contributor
|
LGTM other than the test case comment which mentions -Xlint (not that I think people are deriving a lot of knowledge from test case comments.) |
Contributor
|
-Ywarn-nullary-unit and -Ywarn-adapted-args are the two that are currently disabled (using 2.10.1). I tried hard to keep the second one, but it was problematic due to libraries that rely on it in their DSLs (both Squeryl and lift-json have the issue if I recall correctly). |
Member
Author
|
edited to |
For the purposes of checkability warnings. This will
warn in case of:
scala> (1, 2) match { case Seq() => 0; case _ => 1 }
res9: Int = 1
Given how often Tuples are used as scrutinees, this is
a highly desirable place to warn.
I was orginally going to unlock this under -Xlint, and
could be easily convinced to go that way, given that
-Xfuture is a less popular option.
The motivation is to provide static warnings
in cases like:
scala> (1, 2) match { case Seq() => 0; case _ => 1 }
res9: Int = 1
Member
Author
|
I agree, something as simple as a regex based warning filter would be really useful. |
paulp
added a commit
that referenced
this pull request
Mar 25, 2013
SI-7294 Towards finality for TupleN
szeiger
added a commit
to szeiger/scala
that referenced
this pull request
Jul 7, 2016
This includes undoing the special case for `-Xfuture` introduced in scala#2299 and updating tests to take the new errors into account.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review by @lrytz @paulp (it's a change to a core class, so a few opinions are needed.)