I'm creating this issue to track so we know when it is safe to cleanup our workaround in the NNBD fork of the SDK. It came up from an email thread with @johnniwinther. The issues with LUB is compounded when nullability is added to the function types.
Repro:
typedef F1 = R Function<R>()?;
f() {
R Function<R>()? a;
R Function<R>()? b;
F1 c = a ?? b;
}
Errors:
repro.dart:6:12: Error: A value of type 'Object Function()' can't be assigned to a variable of type 'R Function<R>()'.
- 'Object' is from 'dart:core'.
F1 c = a ?? b;