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
val a: String = null
?(a.toInt) // throws NumberFormatException
The above snippet fails due to Scala wrapping a in an implicit class and the macro not knowing how to check for null properly in this instance. The snippet below is what the above code compiles to. The macro should instead check if a is != null and apply the wrapper in the body of the if.
{
<synthetic> val fresh$macro$1: scala.collection.StringOps = scala.Predef.augmentString(a);
if (fresh$macro$1.$bang$eq(null))
fresh$macro$1.toInt
else
null
}
The text was updated successfully, but these errors were encountered:
The above snippet fails due to Scala wrapping a in an implicit class and the macro not knowing how to check for null properly in this instance. The snippet below is what the above code compiles to. The macro should instead check if a is
!=
null and apply the wrapper in the body of the if.The text was updated successfully, but these errors were encountered: