blob: 0ce9817b658e7585493e0da0c55e555368fd8322 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/issue41437b.dart:21:10: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
// - 'Iterable' is from 'dart:core'.
// yield* getIterableNull(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
// - 'Iterable' is from 'dart:core'.
// Iterable<bool> test5() => getIterableNull(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437b.dart:38:12: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
// - 'Iterable' is from 'dart:core'.
// yield* getIterableNull(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
// - 'Iterable' is from 'dart:core'.
// Iterable<bool> test5() => getIterableNull(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437b.dart:49:5: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
// - 'Iterable' is from 'dart:core'.
// })(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437b.dart:54:5: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
// - 'Iterable' is from 'dart:core'.
// })(); // error
// ^
//
// pkg/front_end/testcases/nnbd/issue41437b.dart:55:50: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
// - 'Iterable' is from 'dart:core'.
// Iterable<bool> var5 = (() => getIterableNull())(); // error
// ^
//
import self as self;
import "dart:core" as core;
static method getNull() dynamic
return null;
static method getIterableNull() core::Iterable<dynamic> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_current} = null;
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
}
static method getIterableBool() core::Iterable<core::bool> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_current} = true;
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
}
static method test1() core::Iterable<core::bool> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_current} = self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
}
static method test2() core::Iterable<core::bool>
return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<core::bool>;
static method test3() core::bool
return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
static method test4() core::Iterable<core::bool> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_yieldEachIterable} = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:21:10: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
- 'Iterable' is from 'dart:core'.
yield* getIterableNull(); // error
^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
}
static method test5() core::Iterable<core::bool>
return invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
- 'Iterable' is from 'dart:core'.
Iterable<bool> test5() => getIterableNull(); // error
^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
static method test6() core::Iterable<core::bool>
return self::getIterableBool();
static method test7() core::Iterable<core::bool> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableBool();
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
}
static method test() dynamic async /* futureValueType= dynamic */ {
function test1() core::Iterable<core::bool> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_current} = self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
}
function test2() core::Iterable<core::bool>
return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<core::bool>;
function test3() core::bool
return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
function test4() core::Iterable<core::bool> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_yieldEachIterable} = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:38:12: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
- 'Iterable' is from 'dart:core'.
yield* getIterableNull(); // error
^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
}
function test5() core::Iterable<core::bool>
return invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
- 'Iterable' is from 'dart:core'.
Iterable<bool> test5() => getIterableNull(); // error
^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
function test6() core::Iterable<core::bool>
return self::getIterableBool();
function test7() core::Iterable<core::bool> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableBool();
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
}
core::Iterable<core::bool> var1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:49:5: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
- 'Iterable' is from 'dart:core'.
})(); // error
^" in (() core::Iterable<dynamic> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_current} = self::getNull();
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
})(){() core::Iterable<dynamic>} as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
core::Iterable<core::bool> var2 = (() dynamic => self::getNull())(){() dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<core::bool>;
core::bool var3 = (() dynamic => self::getNull())(){() dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
core::Iterable<core::bool> var4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:54:5: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
- 'Iterable' is from 'dart:core'.
})(); // error
^" in (() core::Iterable<dynamic> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableNull();
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
})(){() core::Iterable<dynamic>} as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
core::Iterable<core::bool> var5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:55:50: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
- 'Iterable' is from 'dart:core'.
Iterable<bool> var5 = (() => getIterableNull())(); // error
^" in (() core::Iterable<dynamic> => self::getIterableNull())(){() core::Iterable<dynamic>} as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
core::Iterable<core::bool> var6 = (() core::Iterable<core::bool> => self::getIterableBool())(){() core::Iterable<core::bool>};
core::Iterable<core::bool> var7 = (() core::Iterable<core::bool> /* originally sync* */ {
function :sync_op_gen() (core::_SyncIterator<dynamic>?, dynamic, dynamic) core::bool* {
core::int :await_jump_var = 0;
dynamic :await_ctx_var;
function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) core::bool* yielding {
{
{
:iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableBool();
[yield] true;
}
}
return false;
}
return :sync_op;
}
return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
})(){() core::Iterable<core::bool>};
}
static method main() dynamic {}