blob: bdc66d10b55ec7823df0938e530bf95bd81f8e6f [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart:7:33: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
// int Function(int) f = funcValue.call; // Disallowed!
// ^
//
import self as self;
import "dart:core" as core;
static field <T extends core::Object? = dynamic>(T%) T% funcValue = #C1;
static field (core::int) core::int f = let final Never #t1 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart:7:33: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'int Function(int)'.
int Function(int) f = funcValue.call; // Disallowed!
^" in self::funcValue.call as{TypeError,ForNonNullableByDefault} (core::int) → core::int;
static method func<T extends core::Object? = dynamic>(self::func::T% value) → self::func::T%
return value;
static method main() → dynamic {}
constants {
#C1 = static-tearoff self::func
}