New issue
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
Wart(s) to check for StringOps#toInt etc. #560
Labels
Comments
Just thinking out loud: the wart wouldn't necessarily need to be specific to 2.13 - although it might be useful to tailor error messages to something like:
(or possibly for forwards-compatibility, suggest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In a similar vein to
OptionPartial
andTryPartial
, we can check for non-total conversions fromString
to primitive types:Offending methods in
scala.collection.StringOps
aretoBoolean
,toByte
,toDouble
,toFloat
,toInt
,toLong
andtoShort
.Note that this wart would be specific to Scala 2.13, since that's when we got the
to*Option
syntax.The text was updated successfully, but these errors were encountered: