blob: bc6078e396298aa53d5f23e57827cff82bf58071 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/general/generic_function_type_in_message.dart:8:11: Error: A value of type 'num Function<A extends num, B extends num>(A, B)' can't be assigned to a variable of type 'int'.
// int x = add;
// ^
//
import self as self;
import "dart:core" as core;
static method add<A extends core::num, B extends core::num>(self::add::A a, self::add::B b) core::num
return a.{core::num::+}(b){(core::num) core::num};
static method test() dynamic {
core::int x = invalid-expression "pkg/front_end/testcases/general/generic_function_type_in_message.dart:8:11: Error: A value of type 'num Function<A extends num, B extends num>(A, B)' can't be assigned to a variable of type 'int'.
int x = add;
^" in #C1 as{TypeError,ForNonNullableByDefault} core::int;
}
static method main() dynamic {
if(self::add<core::int, core::int>(1, 2).{core::num::<}(3){(core::num) core::bool})
self::test();
}
constants {
#C1 = static-tearoff self::add
}