You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Tomáš Procházka (Jira)" <ji...@apache.org> on 2020/07/02 16:15:00 UTC
[jira] [Updated] (NETBEANS-4185) PHP: Phpdoc is ignored when :self
return type used
[ 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: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists