You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have warn-unused turned on, I get a warning on this:
private val in method bar is never used.
But notice, there is no val here. I've used the underscore here.
I don't have a workaround to suppress this warning other than rewriting as
@Testdefbar () {
foo() match { caseSeq(_,_) =>/* ok */ }
}
Having to permute the source code into a match-case just to suppress this spurious warning is painful, and there is a loss of code symmetry I don't like, as lots of other very similar tests look like:
@Testdefbar2() {
valSeq(a, _) = foo2()
assertEquals("a", a)
}
This does not produce the spurious warning.
The text was updated successfully, but these errors were encountered:
I have lots of unit test code with lines like this:
When I have warn-unused turned on, I get a warning on this:
But notice, there is no val here. I've used the underscore here.
I don't have a workaround to suppress this warning other than rewriting as
Having to permute the source code into a match-case just to suppress this spurious warning is painful, and there is a loss of code symmetry I don't like, as lots of other very similar tests look like:
This does not produce the spurious warning.
The text was updated successfully, but these errors were encountered: