library test /*isLegacy*/; | |
// | |
// Problems in library: | |
// | |
// pkg/front_end/testcases/inference/type_promotion_stopped_by_access_in_a_closure.dart:5:1: Error: Library doesn't support null safety. | |
// // @dart=2.9 | |
// ^^^^^^^^^^^^ | |
// | |
import self as self; | |
import "dart:core" as core; | |
static method main() → dynamic { | |
has-declared-initializer core::num* n = null; | |
if(n is{ForLegacy} core::int*) { | |
core::num* i = n; | |
() → Null { | |
n; | |
}; | |
} | |
n = null; | |
} |