Files
sdk/pkg/front_end/test/flow_analysis/nullability/data/while.dart
T
Paul Berry 2cac8637d6 Flow analysis: separate nullability and reachability tests.
Change-Id: I875493ff504f094ade2818f29539525fdd75a808
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-05 22:12:26 +00:00

18 lines
376 B
Dart

// 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.
void eqNull(int? x) {
while (x == null) {
x;
}
/*nonNullable*/ x;
}
void notEqNull(int? x) {
while (x != null) {
/*nonNullable*/ x;
}
x;
}