But seems that this case still slips through:
-
String foo() {
int? a;
return (a?.abs().sign).toString(); // Unnecessary use of parentheses.
}
-
String foo() {
int? a;
return a?.abs().sign.toString(); // 'String?' can't be returned from a function with return type 'String'
}
Probably the complicating factor is that toString is available on Object? and the null-aware expression has another dot after it