blob: 47dadba58a185dd49290a129e77b43195cd10b63 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/function_type_assignments.dart:11:12: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'String'.
// Try changing the type of the left hand side, or casting the right hand side to 'String'.
// String x = identity; // No bound
// ^
//
// pkg/front_end/testcases/function_type_assignments.dart:12:12: Error: A value of type 'T Function<T extends Object>(T)' can't be assigned to a variable of type 'String'.
// - 'Object' is from 'dart:core'.
// Try changing the type of the left hand side, or casting the right hand side to 'String'.
// String y = identityObject; // Object bound
// ^
//
// pkg/front_end/testcases/function_type_assignments.dart:13:12: Error: A value of type 'T Function<T extends List<T>>(T)' can't be assigned to a variable of type 'String'.
// - 'List' is from 'dart:core'.
// Try changing the type of the left hand side, or casting the right hand side to 'String'.
// String z = identityList; // List<T> bound
// ^
//
import self as self;
import "dart:core" as core;
static field core::String x = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/function_type_assignments.dart:11:12: Error: A value of type 'T Function<T>(T)' can't be assigned to a variable of type 'String'.
Try changing the type of the left hand side, or casting the right hand side to 'String'.
String x = identity; // No bound
^" in self::identity as{TypeError} core::String;
static field core::String y = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/function_type_assignments.dart:12:12: Error: A value of type 'T Function<T extends Object>(T)' can't be assigned to a variable of type 'String'.
- 'Object' is from 'dart:core'.
Try changing the type of the left hand side, or casting the right hand side to 'String'.
String y = identityObject; // Object bound
^" in self::identityObject as{TypeError} core::String;
static field core::String z = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/function_type_assignments.dart:13:12: Error: A value of type 'T Function<T extends List<T>>(T)' can't be assigned to a variable of type 'String'.
- 'List' is from 'dart:core'.
Try changing the type of the left hand side, or casting the right hand side to 'String'.
String z = identityList; // List<T> bound
^" in self::identityList as{TypeError} core::String;
static method identity<T extends core::Object = dynamic>(self::identity::T t) → self::identity::T
return t;
static method identityObject<T extends core::Object = core::Object>(self::identityObject::T t) → self::identityObject::T
return t;
static method identityList<T extends core::List<self::identityList::T> = core::List<dynamic>>(self::identityList::T t) → self::identityList::T
return t;
static method main() → dynamic {}