Skip to content
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

Named arguments are not properly substituted #7

Open
ian-zunderdorp opened this issue Sep 22, 2021 · 1 comment
Open

Named arguments are not properly substituted #7

ian-zunderdorp opened this issue Sep 22, 2021 · 1 comment

Comments

@ian-zunderdorp
Copy link

ian-zunderdorp commented Sep 22, 2021

Given a class:

class Foo {
  public static function foo(string $a, string $b, string $c): self
  { ... }
}

When calling this in the original code:

Foo::foo(a: 'hello', b: 'world', c: '!');

It is transpiled to:

Foo::foo(a: 'hello', b: 'world', c: '!');

This also happens with non-static methods
The rest of the transpilation seems to work correctly.

@danog
Copy link
Contributor

danog commented Sep 27, 2021

Thanks for reporting, named arguments are one of the trickier PHP 8 features that potentially require runtime resolution, though i already have ideas for transpilation-time substitution, that I will implement ASAP :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants