[
https://issues.apache.org/jira/browse/NETBEANS-4185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tomáš Procházka updated NETBEANS-4185:
--------------------------------------
Description:
{code:php}
class A
{
public $x;
/**
* @return static
*/
public function x(): self { }
}
class B extends A
{
public $y;
}
$cl = new B();
$cl->x()-> // ->y is not autohinted due to the "self" return type even if
documented with "static" return type
{code}
The return type of B::x() should be "B" (static) instead of "A" (self).
was:
class A
{
public $x;
/**
* @return static
*/
public function x(): self
{
}
}
class B extends A
{
public $y;
}
$cl = new B();
$cl->x()-> // ->y is not autohinted due to the "self" return type even if
documented with "static" return type
The return type of B::x() should be "B" (static) instead of "A" (self).
> PHP: Phpdoc is ignored when :self return type used
> --------------------------------------------------
>
> Key: NETBEANS-4185
> URL: https://issues.apache.org/jira/browse/NETBEANS-4185
> Project: NetBeans
> Issue Type: Bug
> Components: php - Code Analysis, php - Refactoring
> Affects Versions: 11.0, 11.2
> Reporter: Michael Vorisek
> Priority: Critical
>
> {code:php}
> class A
> {
> public $x;
> /**
> * @return static
> */
> public function x(): self { }
> }
> class B extends A
> {
> public $y;
> }
> $cl = new B();
> $cl->x()-> // ->y is not autohinted due to the "self" return type even if
> documented with "static" return type
> {code}
> The return type of B::x() should be "B" (static) instead of "A" (self).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists