User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 Build Identifier: Hey when i type new Foo() kdevelop offers me code completion and lets me select bar() as method. No matter if I do that or type it manually afterwards it marks it as wrong syntax under the "->". Reproducible: Always
Okay, the syntax check is indeed right, PHP doesn't suppor this (WTH?!). So instead the code completion shouldn't offer to call methods on the object.
Git commit 9141e9d737cc2635e7573a8b71423de9d52c3389 by Heinz Wiesinger. Committed on 21/01/2014 at 17:43. Pushed by wiesinger into branch 'master'. Support the syntax for class member access on instantiation. This adds support for syntax like (new Foo())->bar() as introduced in PHP 5.4. The bug, that ($a)-> still offers completion even though it is invalid syntax (stupid PHP) remains though. Related: bug 305779 REVIEW: 115304 M +15 -13 duchain/builders/declarationbuilder.cpp M +2 -1 duchain/expressionvisitor.cpp M +19 -0 duchain/tests/expressionparser.cpp M +1 -0 duchain/tests/expressionparser.h M +14 -3 parser/php.g http://commits.kde.org/kdev-php/9141e9d737cc2635e7573a8b71423de9d52c3389
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.