rfc:allow-void-variance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
rfc:allow-void-variance [2019/02/04 06:34] wesnetmorfc:allow-void-variance [2019/02/04 06:39] wesnetmo
Line 35: Line 35:
 function myFooConsumer (Foo $foo) { function myFooConsumer (Foo $foo) {
  
-   // method() is void, therefore we won't be using its return type+   // method() is void, therefore we won't be using its return value
        
    $foo->method();    $foo->method();
Line 109: Line 109:
 } }
 </code> </code>
 +
 +===== Precedents in other languages =====
 +
 +TypeScript does this (are there other languages?).
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
rfc/allow-void-variance.txt · Last modified: 2019/02/04 07:48 by wesnetmo