DUChain questions
Niko Sams
niko.sams at gmail.com
Thu Sep 4 17:36:23 UTC 2008
>> 1. two declarations with different types and the same identifier
>> within one scope,
>> example:
>> class A {}
>> class B {}
>> $foo = new A();
>> $foo = new B();
>>
>> Currently I create a new declaration on every assignment operation. In
>> that example
>> there are two declarations. But the uses don't work correctly - once I
>> add uses to one declaration
>> both return them in uses().
>> What is the correct way to go here?
>
> Well, the second assignment should be a use of the $foo declaration I think.
but the second assignment can a different type than the first one. Because of
that I currenly create a new declaration for every assignment.
> Hmm I only see one solution to this: Parse everything twice. After the first
> cycle all classes will be in the symbol-table/code-model, after the second
> pass uses and types will be correct.
How could I trigger such a reparse?
Niko
More information about the KDevelop-devel
mailing list