Closed
Description
Dart SDK version: 2.13.0-114.0.dev (dev) (Sat Mar 6 18:27:50 2021 -0800) on "windows_x64"
Here is a source code example which demonstrates the failure:
typedef void TEST<T extends void Function<TT>(TT)>();
void testme<T extends void Function<TT>(TT)>() {}
main() {
TEST t = testme;
}
Sample output is:
$>dart --enable-experiment=generic-metadata test.dart
Unhandled exception:
type '<X0>(X0) => void' is not a subtype of type '<X1>(dynamic) => void' of 'T'
#0 _boundsCheckForPartialInstantiation (dart:_internal-patch/internal_patch.dart:147:57)
#1 main (file:///D:/DART/sdk/tests/co19/src/LanguageFeatures/Generic-functions-as-type-args/test.dart)
#2 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:283:19)
#3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Similar covariant case passes OK without any errors or warnings.