Files
sdk/pkg/front_end/testcases/nnbd/issue43721.dart
T
Dmitry Stefantsov 319c02c3c0 [cfe] Implement the update in UP for FutureOr types
Closes #43721.
Closes #43677.

Bug: https://github.com/dart-lang/sdk/issues/43721
Bug: https://github.com/dart-lang/sdk/issues/43677
Change-Id: Iac7840e7699809946830067cd709314c6302986e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166639
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-10-09 13:39:16 +00:00

17 lines
380 B
Dart

// Copyright (c) 2020, 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.
import 'dart:async';
foo(Object x) {}
bar(bool condition) {
FutureOr<int?> x = null;
num n = 1;
var z = condition ? x : n;
foo(z); // Error.
}
main() {}