rfc:generics
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
rfc:generics [2016/04/25 14:18] – additional notes on the is-keyword mindplay | rfc:generics [2016/04/25 14:58] – note about generic constructors mindplay | ||
---|---|---|---|
Line 327: | Line 327: | ||
The same applies when overriding constructors and static methods. | The same applies when overriding constructors and static methods. | ||
+ | |||
+ | ==== Generic Constructors ==== | ||
+ | |||
+ | Constructors may accept arbitrary type-arguments, | ||
+ | |||
+ | <code php> | ||
+ | class Hello< | ||
+ | { | ||
+ | public function __construct< | ||
+ | { | ||
+ | // ... | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | In other words, the constructor may accept more type-arguments than those affecting the type. | ||
==== Generic Closures ==== | ==== Generic Closures ==== |
rfc/generics.txt · Last modified: 2018/06/02 17:33 by mindplay