blob: edff378bc988093be7e46b835a9e4b0b5476128b [file] [log] [blame]
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// @assertion A check of the form [e == null] or of the form [e is Null] where
/// [e] has static type [T] promotes the type of [e] to [Null] in the [true]
/// continuation, and to [NonNull(T)] in the [false] continuation.
/// @description Check that [e] is promoted to [NonNull(T)] in the [false]
/// condition. Test pre-NNBD legacy types
/// @author
/// @issue 41494
// Requirements=nnbd-weak
import "legacy_lib.dart";
dynamic init(x) => x;
main() {
A? a = init(A());
if (a is Null) {
} else {;
A a1 = a;
if (a == null) {
} else {;
A a1 = a;