cretz / pratphall

A typed language targeting PHP (abandoned)
http://cretz.github.io/pratphall/
Other
45 stars 5 forks source link

Variables used twice in anonymous functions are in use clause twice #2

Closed cretz closed 11 years ago

cretz commented 11 years ago

This:

var a = 1;
var test = () => {
  var_dump(a);
  var_dump(a);
};

Becomes:

$a = 1;
$test = function () use ($a, $a) {
    var_dump($a);
    var_dump($a);
};