D7034: Add callable type to PHP

Matthijs Tijink noreply at phabricator.kde.org
Tue Aug 1 22:00:47 UTC 2017

mtijink added inline comments.


> zhigalin wrote in duchain.cpp:751
> The problem arises then you return the **result** of calling `$i()` and the parser still think you're returning a callable

Ah ok, you're correct. But that's not due to a problem in this code, but problems in the `ExpressionVisitor`: it skips most operators, such that the resulting type is that of the last appearing variable/literal. Thus, it applies the type of `$i` instead of the result of calling the function.

For example, `function foo() { $i = function () {}; return $i(); }` yields type `void () foo ()`, which also is incorrect.

  R52 KDevelop: PHP Support


To: mtijink, #kdevelop, zhigalin
Cc: zhigalin, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170801/8556e618/attachment.html>

More information about the KDevelop-devel mailing list