phabelio/phabel

Named arguments are not properly substituted

Opened this issue · 1 comments

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 commented

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 :)