Closed
Description
The code below produces compile-time error in analyzer and no issues in CFE
test<X>(X? x) {
if (x is String?) {
Object o = x; // Error in analyzer. A value of type 'X?' can't be assigned to a variable of type 'Object'
}
}
main() {
test<String>("");
}
If to remove if (x is String?) {
from function test
then CFE starts produce an error as well
Dart VM version: 2.9.0-11.0.dev (dev) (Tue May 26 12:14:57 2020 +0200) on "windows_x64"