D26254: Add support for PHP 7.4's typed properties

Hugues Mitonneau noreply at phabricator.kde.org
Wed Apr 15 17:06:34 BST 2020


hmitonneau added a comment.


  I have compiled from scratch with kdesrc-build (with `cmake-options -DCMAKE_BUILD_TYPE=RelWithDebInfo`). The duchain test still doesn't pass.
  After some debug, it seems that `m_gotTypeFromTypeHint` is not always initialized correctly.
  The following patch fix the problem for me:
  
    diff --git a/duchain/builders/typebuilder.cpp b/duchain/builders/typebuilder.cpp
    index 18e6bcb..c7f147e 100644
    --- a/duchain/builders/typebuilder.cpp
    +++ b/duchain/builders/typebuilder.cpp
    @@ -347,6 +347,7 @@ void TypeBuilder::visitClassStatement(ClassStatementAst *node)
                 m_gotTypeFromDocComment = false;
             }
         } else {
    +        m_gotTypeFromTypeHint = false;
             //member-variable
             parseDocComment(node, QStringLiteral("var"));
             TypeBuilderBase::visitClassStatement(node);

REPOSITORY
  R52 KDevelop: PHP Support

REVISION DETAIL
  https://phabricator.kde.org/D26254

To: pprkut
Cc: hmitonneau, kdevelop-devel, christiant, glebaccon, domson, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20200415/d7ea6926/attachment.html>


More information about the KDevelop-devel mailing list