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

Final private method in trait overridden by a child class of the using class is not caught by hh_client #9046

Open
lexidor opened this issue Mar 31, 2022 · 0 comments
Labels

Comments

@lexidor
Copy link
Collaborator

lexidor commented Mar 31, 2022

After doing some work on this, I kinda think we should ban it on traits too. If we only ban final private methods on classes, hh will still accept this code that HHVM rejects:

trait MyTrait {
  public function foo(): void { $this->bar(); }
  final private function bar(): void {}
}

class MyClass {
  use MyTrait;
}

class MyChild extends MyClass {
  private function bar(): void {}
}

@lexidor do you have any opinions here?

Originally posted by @Wilfred in #8805 (comment)

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

No branches or pull requests

1 participant