Ticket #1487 (new bug)
Object.find_method fails if PIR 'find_method' vtable override returns null
Reported by: | Austin_Hastings | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Version: | 2.1.0 |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
If I override the 'find_method' vtable for a class, the object.pmc code correctly locates the override and calls it.
However, the same code assumes that any overridden find_method will automatically succeed.
This is inconsistent with the way the default behavior is implemented, which allows a class to return null and then passes on to the next class in the MRO.
(I can see where it might be desirable to "block" method lookup from parent classes. But I think it's more likely that some kind of AUTOLOAD behavior is going to match-these-names or pass to the ancestor. Blocking can be implemented with a sub that dies, or Undef.)