blob: 1a6f68b998e0a0bea8424acb62c295a3047c7280 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/issue41437c.dart:21:10: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
// - 'Stream' is from 'dart:async'.
// yield* getStreamNull(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
// - 'Stream' is from 'dart:async'.
// Stream<bool> test5() => getStreamNull(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437c.dart:38:12: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
// - 'Stream' is from 'dart:async'.
// yield* getStreamNull(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
// - 'Stream' is from 'dart:async'.
// Stream<bool> test5() => getStreamNull(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437c.dart:49:5: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
// - 'Stream' is from 'dart:async'.
// })(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437c.dart:54:5: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
// - 'Stream' is from 'dart:async'.
// })(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437c.dart:55:46: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
// - 'Stream' is from 'dart:async'.
// Stream<bool> var5 = (() => getStreamNull())(); // error
// ^
//
import self as self;
import "dart:async" as asy;
import "dart:core" as core;
static method getNull() dynamic
return null;
static method getStreamNull() asy::Stream<dynamic> async* {
yield null;
}
static method getStreamBool() asy::Stream<core::bool> async* {
yield true;
}
static method test1() asy::Stream<core::bool> async* {
yield self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
}
static method test2() asy::Stream<core::bool>
return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<core::bool>;
static method test3() core::bool
return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
static method test4() asy::Stream<core::bool> async* {
yield* let final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:21:10: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
- 'Stream' is from 'dart:async'.
yield* getStreamNull(); // error
^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
}
static method test5() → asy::Stream<core::bool>
return let final Never #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:24:25: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
- 'Stream' is from 'dart:async'.
Stream<bool> test5() => getStreamNull(); // error
^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
static method test6() → asy::Stream<core::bool>
return self::getStreamBool();
static method test7() → asy::Stream<core::bool> async* {
yield* self::getStreamBool();
}
static method test() → dynamic async {
function test1() → asy::Stream<core::bool> async* {
yield self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
}
function test2() → asy::Stream<core::bool>
return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<core::bool>;
function test3() → core::bool
return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
function test4() → asy::Stream<core::bool> async* {
yield* let final Never #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:38:12: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
- 'Stream' is from 'dart:async'.
yield* getStreamNull(); // error
^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
}
function test5() → asy::Stream<core::bool>
return let final Never #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:41:27: Error: A value of type 'Stream<dynamic>' can't be returned from a function with return type 'Stream<bool>'.
- 'Stream' is from 'dart:async'.
Stream<bool> test5() => getStreamNull(); // error
^" in self::getStreamNull() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
function test6() → asy::Stream<core::bool>
return self::getStreamBool();
function test7() → asy::Stream<core::bool> async* {
yield* self::getStreamBool();
}
asy::Stream<core::bool> var1 = let final Never #t5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:49:5: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
- 'Stream' is from 'dart:async'.
})(); // error
^" in (() → asy::Stream<dynamic> async* {
yield self::getNull();
}).call() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
asy::Stream<core::bool> var2 = (() → dynamic => self::getNull()).call() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Stream<core::bool>;
core::bool var3 = (() → dynamic => self::getNull()).call() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
asy::Stream<core::bool> var4 = let final Never #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:54:5: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
- 'Stream' is from 'dart:async'.
})(); // error
^" in (() → asy::Stream<dynamic> async* {
yield* self::getStreamNull();
}).call() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
asy::Stream<core::bool> var5 = let final Never #t7 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437c.dart:55:46: Error: A value of type 'Stream<dynamic>' can't be assigned to a variable of type 'Stream<bool>'.
- 'Stream' is from 'dart:async'.
Stream<bool> var5 = (() => getStreamNull())(); // error
^" in (() → asy::Stream<dynamic> => self::getStreamNull()).call() as{TypeError,ForNonNullableByDefault} asy::Stream<core::bool>;
asy::Stream<core::bool> var6 = (() → asy::Stream<core::bool> => self::getStreamBool()).call();
asy::Stream<core::bool> var7 = (() → asy::Stream<core::bool> async* {
yield* self::getStreamBool();
}).call();
}
static method main() → dynamic {}