mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
b8098e9683
This CL adds a new feature specification for 'generic function instantiation' (aka partial specialization, type-curried invocation, etc.), which amounts to implicitly obtaining a non-generic function from a denotation of a generic function when the typing requires the latter. This feature spec relies on type inference, but as a black box (so it can hardly be incompatible with any current or future version of type inference in Dart). Note that it is a restricted version of generic function instantiation which is specified here, it only supports global and static functions and instance methods; function literals and first class function values are not supported. I just learned from Vijay (Mar 23, 3pm CET) that first class functions _do_ support generic function instantiation in some existing implementations. So maybe there is no problem supporting them, and we should just eliminate that restriction? Here is a rendered version of the document, refreshed to match patch set 19: https://gist.github.com/eernstg/bf816d3495e9b87ab6eb958ba707d016 Change-Id: Ie1fd601d3e359bfb5f4616f8ec68a110f42e01b7 Reviewed-on: https://dart-review.googlesource.com/47043 Reviewed-by: Lasse R.H. Nielsen <lrn@google.com> |
||
---|---|---|
.. | ||
language | ||
newsletter |