Files
sdk/pkg/front_end/testcases/bug33298.dart.strong.expect
T
Jens Johansen dab228e55f Save problems in ast - fasta changes
Change-Id: Id38f5e7495c245e5a7b161b55c58b8826c146a80
Reviewed-on: https://dart-review.googlesource.com/c/90000
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-01-17 10:46:13 +00:00

49 lines
2.9 KiB
Plaintext

library;
//
// Problems in library:
//
// pkg/front_end/testcases/bug33298.dart:28:44: Error: The argument type 'T Function<T>(T)' can't be assigned to the parameter type 'dynamic Function(String)'.
// Try changing the type of the parameter, or casting the argument to 'dynamic Function(String)'.
// List<String> list6 = ['a', 'b', 'c'].map(c).toList();
// ^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
;
method call(core::String s) → core::String
return "${s}${s}";
}
class B<T extends core::Object = dynamic> extends core::Object {
synthetic constructor •() → self::B<self::B::T>
: super core::Object::•()
;
method call(generic-covariant-impl self::B::T t) → self::B::T
return t;
}
class C extends core::Object {
synthetic constructor •() → self::C
: super core::Object::•()
;
method call<T extends core::Object = dynamic>(self::C::call::T t) → self::C::call::T
return t;
}
static method test() → dynamic {
self::A a = new self::A::•();
core::List<core::String> list1 = <core::String>["a", "b", "c"].{core::Iterable::map}<core::String>(a.{self::A::call}).{core::Iterable::toList}();
core::List<core::String> list2 = <core::String>["a", "b", "c"].{core::Iterable::map}<core::String>(let final self::A #t1 = a in #t1.==(null) ?{(core::String) → core::String} null : #t1.{self::A::call}).{core::Iterable::toList}();
self::B<core::String> b = new self::B::•<core::String>();
core::List<core::String> list3 = <core::String>["a", "b", "c"].{core::Iterable::map}<core::String>(b.{self::B::call}).{core::Iterable::toList}();
core::List<core::String> list4 = <core::String>["a", "b", "c"].{core::Iterable::map}<core::String>(let final self::B<core::String> #t2 = b in #t2.==(null) ?{(core::String) → core::String} null : #t2.{self::B::call}).{core::Iterable::toList}();
self::C c = new self::C::•();
core::List<core::String> list5 = <core::String>["a", "b", "c"].{core::Iterable::map}<core::String>(c.{self::C::call}<core::String>).{core::Iterable::toList}();
core::List<core::String> list6 = <core::String>["a", "b", "c"].{core::Iterable::map}<dynamic>(let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/bug33298.dart:28:44: Error: The argument type 'T Function<T>(T)' can't be assigned to the parameter type 'dynamic Function(String)'.
Try changing the type of the parameter, or casting the argument to 'dynamic Function(String)'.
List<String> list6 = ['a', 'b', 'c'].map(c).toList();
^" in (let final self::C #t4 = c in #t4.==(null) ?{<T extends core::Object = dynamic>(self::C::call::T) → self::C::call::T} null : #t4.{self::C::call}) as{TypeError} (core::String) → dynamic).{core::Iterable::toList}() as{TypeError} core::List<core::String>;
}
static method main() → dynamic {}