| Summary: | Use the inherited phpDoc to infer type when no info is available in the current implementation | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Mauro Molinari <mauromol> | ||||||
| Component: | PDT | Assignee: | PHP Core <php.core-inbox> | ||||||
| Status: | CLOSED FIXED | QA Contact: | Ilina Stefanova <ilina.s> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ilina.s | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 184686 [details]
patch
Created attachment 184687 [details]
unit test
committed to head,thanks Xu! change to fixed Hi, thanks for the fix! What is the target milestone? Verified. |
Suppose you have the following: class A { public function saySomething() { echo 'something'; } } class B { /** * @param A $b */ public function makeSaySomething($b) { $b->| [1] } } class C extends B { public function makeSaySomething($b) { $b->| [2] } } Invoke code completion at [1] and [2]. At [1] the editor correctly suggests saySomething() method. At [2] it does not. I would expect it to do, since C extends B and C::makeSaySomething() does not provide its own phpDoc to tell something different about the $b parameter. The same should apply if B were an interface and C implemented B.