c191551fac
TEST=Covered by existing tests. Change-Id: Ied8be1874164e68e0a3a48e1b2f9a33310071381 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183009 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr<num?>' can't be assigned to the parameter type 'Object' because 'num?' is nullable and 'Object' isn't.
|
|
// - 'Object' is from 'dart:core'.
|
|
// foo(z); // Error.
|
|
// ^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
import "dart:async";
|
|
|
|
static method foo(core::Object x) → dynamic {}
|
|
static method bar(core::bool condition) → dynamic {
|
|
FutureOr<core::int?>x = null;
|
|
core::num n = 1;
|
|
FutureOr<core::num?>z = condition ?{FutureOr<core::num?>} x : n;
|
|
self::foo(let final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue43721.dart:13:7: Error: The argument type 'FutureOr<num?>' can't be assigned to the parameter type 'Object' because 'num?' is nullable and 'Object' isn't.
|
|
- 'Object' is from 'dart:core'.
|
|
foo(z); // Error.
|
|
^" in z as{TypeError,ForNonNullableByDefault} core::Object);
|
|
}
|
|
static method main() → dynamic {}
|