D26254: Add support for PHP 7.4's typed properties
Hugues Mitonneau <noreply-Buy57tU0AsCGxO/ty/[email protected]>
| Newsgroups | gmane.comp.kde.devel.kdevelop |
|---|---|
| Message-ID | <[email protected]> |
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