D25956: [KDevelop/PHP] Importing functions and const from other namespaces
Heinz Wiesinger
noreply at phabricator.kde.org
Sat Dec 28 09:48:39 GMT 2019
pprkut added inline comments.
INLINE COMMENTS
> uses.cpp:1105-1134
> +void TestUses::useNamespaceFunctionConst()
> +{
> + // 0 1 2 3 4 5 6 7
> + // 01234567890123456789012345678901234567890123456789012345678901234567890123456789
> + TopDUContext* top = parse("<?php\n"
> + "namespace Foo\\Bar {function A(){} const B = 1;}\n"
> + "namespace Baz {function C(){} const D = 1;}\n"
This is fine as a duchain test (within duchain.cpp), but for uses you should compare that the actual references are correct. See calls to compareUses() in other tests here
> uses.cpp:1116
> + "use function Baz\\C as BazC;\n"
> + "use const Baz\\D as BazD;\n"
> + "}\n", DumpNone);
This doesn't seem to be working. "BazD" isn't a constant in the new context, i.e. "echo BazD;" has no highlighting for BazD.
REPOSITORY
R52 KDevelop: PHP Support
REVISION DETAIL
https://phabricator.kde.org/D25956
To: hmitonneau
Cc: pprkut, kdevelop-devel, hmitonneau, 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/20191228/47eedd65/attachment.html>
More information about the KDevelop-devel
mailing list