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
Annotations are generally moved to the same line, but this may change the scope of the annotation.
Original code:
fun <T:Any?> testCasting(test:T, foo:String, bar:String): T {
if (!foo.isEmpty()) {
@Suppress("UNCHECKED_CAST")
bar.isEmpty() ||return (nullasT)
}
return test
}
Formatted code:
fun <T:Any?> testCasting(test:T, foo:String, bar:String): T {
if (!foo.isEmpty()) {
@Suppress("UNCHECKED_CAST") bar.isEmpty() ||return (nullasT)
}
return test
}
After formatting, the Suppress annotation only applies on the first half of the expression, not the part of the expression where the cast actually occurs.
The text was updated successfully, but these errors were encountered:
I guess this is a problem in both ways, since converting case 2 into case 1 would also be a bug no? Does this mean we must preserve spacing on annotations? (At least for expressions)?
Annotations are generally moved to the same line, but this may change the scope of the annotation.
Original code:
Formatted code:
After formatting, the Suppress annotation only applies on the first half of the expression, not the part of the expression where the cast actually occurs.
The text was updated successfully, but these errors were encountered: