The following test produces an errors in CFE but has no issues in CFE
// SharedOptions=--enable-experiment=constructor-tearoffs
T foo1<T>(T value) => value;
main() {
var funcValue1 = foo1;
int Function(int) f1 = funcValue1.call;
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified
T foo2<T>(T value) => value;
var funcValue2 = foo2;
int Function(int) f2 = funcValue2.call;
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified
}
According to the spec it must be an error
Tested on Dart SDK version: 2.15.0-edge.b2b8e59b2863ef02709dfdb750e9ae8e3732389c (be) (Fri Aug 13 01:08:51 2021 +0000) on "windows_x64"