New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[php] syntax error, unexpected '->' #6294

Closed
kevinresol opened this Issue May 19, 2017 · 0 comments

Comments

Projects
None yet
3 participants
@kevinresol
Contributor

kevinresol commented May 19, 2017

class Main {
    static function main() {
        (cast (new Foo():{})).handle();
    }
}

class Foo {
    public function new(){}
    public function handle() {}
}

This generate invalid syntax in old php generator:

static function main() {
	new Foo()->handle();
}

php7 is fine.

@kevinresol kevinresol changed the title from [php] parse error '->' to [php] syntax error, unexpected '->' May 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment