Commit 4c0656a
authored
Generic method instantiation does not apply for the
Generic function instantiation was never intended to support function objects, it was only intended to be supported for terms that statically resolve to a function declaration. Similarly, generic method instantiation was only intended to be supported for property extractions that statically resolve to a generic method (so the signature was statically known, but the actual implementation was determined at run time).
However, following the wording in the specification, the `call` method of a function type could be used to perform generic method instantiation on an arbitrary function object, which implied that generic function instantiation was supported for arbitrary functions after all.
This PR changes the spec wording such that this (unintended) feature is no more specified to exist.
There is no implementation work in the CFE, because the CFE always reported an error in this case. For the analyzer, see dart-lang/sdk#45936.call of function objects (#1616)1 parent 88306bd commit 4c0656a
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14545 | 14545 | | |
14546 | 14546 | | |
14547 | 14547 | | |
14548 | | - | |
| 14548 | + | |
| 14549 | + | |
14549 | 14550 | | |
14550 | 14551 | | |
14551 | 14552 | | |
| |||
0 commit comments