Question about AbstractUseBuilder::newUse

Hamish Rodda rodda at kde.org
Thu Mar 12 22:03:43 UTC 2009


Hi,

On Friday 13 March 2009 02:00:06 Cédric Pasteur wrote:
> Hi,
> I am writing a language support plugin for OCaml (I'll soon commit it to
> playground). In Caml, every file automatically corresponds to a module
> named like the file, so I decided to create a namespace context in the main
> ast node.

For Caml, are the identifiers in each file truly namespaced? ie., do you refer 
to other file's identifiers using the qualified name including the file name?

> The problem is that when I add this context , use building fails inside
> this context. It works correctly in child contexts (eg functions) but a
> call to new use in the namespace context doesn't have any effect.
> Everything works if I don't create this top namespace context.
>
> What can be the reason for a newUse() call to fail ? What am I doing wrong?

Uses were reworked by David and I haven't thoroughly gone through the code for 
them, but if the namespace means that the declaration(s) cannot be found, that 
may be the problem (at a guess).  If you search for the declaration, with and 
without the namespace context, at the place where you call newUse, do you get 
a declaration without the namespace context and none with it?

Cheers,
Hamish.




More information about the KDevelop-devel mailing list