sdk
sdk copied to clipboard
[analyzer] `TypeProvider` could have a `FunctionType` method
Today over at pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart we have:
https://github.com/dart-lang/sdk/blob/9ac53f780c2bac16a338ad7130e5a8c5446e1212/pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart#L101-L108
A similar idea was also implemented at https://dart-review.googlesource.com/c/sdk/+/464580.
I was working on my own plugins today, and I think having a method for constructing FunctionTypes would be better than asking our plugin authors to instantiate FunctionTypeImpl.
I guess record types might also fall under this request, too. For both, we only have the core classes access through TypeProvider.
CC @scheglov @srawlins