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

Wrong method override called #142

Closed
roberthusak opened this issue Jan 8, 2018 · 0 comments
Closed

Wrong method override called #142

roberthusak opened this issue Jan 8, 2018 · 0 comments
Assignees
Labels
Projects

Comments

@roberthusak
Copy link
Contributor

Test case:

<?php
class A implements Iterator {
  function rewind() { echo "A"; }
  function next() { }
  function valid() { }
  function key() { }
  function current() { }
}
class B extends A {
  function rewind() { echo "B"; }
}
function test(Iterator $i) {
  $i->rewind();
}
test(new B);

Expected result: B
Actual result: A

@roberthusak roberthusak added this to TODO in MediaWiki via automation Jan 8, 2018
MediaWiki automation moved this from TODO to Done Jan 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
MediaWiki
  
Done
Development

No branches or pull requests

2 participants