sdk
sdk copied to clipboard
Fix the nullability of `InvalidType`
An InvalidType should simultaneously be both nullable and non-nullable. The following produces two diagnostics:
void f(String s) {
if (s.len case var len?) {
print(len);
}
}
The first indicates that len isn't defined; the second complains that the ? isn't required because s.len (whose static type is InvalidType) isn't nullable. It shouldn't complain either with or without the ?.