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

Support private trait aliasing #909

Closed
muglug opened this issue Jul 23, 2018 · 0 comments
Closed

Support private trait aliasing #909

muglug opened this issue Jul 23, 2018 · 0 comments
Labels

Comments

@muglug
Copy link
Collaborator

muglug commented Jul 23, 2018

trait T {
  public function foo() : void {
    echo "here";
  }
}

class C {
  use T {
    foo as private traitFoo;
  }
  
  public function bar() : void {
    $this->traitFoo();
  }
}

class D extends C {
  public function bar() : void {
    $this->traitFoo(); // should fail
  }
}

Expected: Call to private method C::traitFoo from context D
Actual: No issue
https://getpsalm.org/r/695c8bd848

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