D25956: [KDevelop/PHP] Importing functions and const from other namespaces

Heinz Wiesinger <noreply-Buy57tU0AsCGxO/ty/[email protected]>
Newsgroups gmane.comp.kde.devel.kdevelop
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.