An error occurred while fetching the assigned milestone of the selected merge_request.
Implement late-binding `static`, make `self` eager binding, closes #14
This changes self
to a reference to the class it's in:
// input
class A {
static $abc = 1;
function xyz () { return self::$abc; }
}
// output
class A {
static abc = 1;
xyz() {
return A.abc;
}
};
And static
to a late-bound reference:
// input
class A {
static $abc = 1;
static function lol () { return static::$abc; }
function xyz () { return static::$abc; }
}
// output
class A {
static abc = 1;
static lol() {
return this.abc;
}
xyz() {
return this.constructor.abc;
}
};
Merge request reports
Activity
mentioned in merge request !3
mentioned in issue #14 (closed)
Please register or sign in to reply