Skip to content

Completion for supersuperclass method does not show up #394

@dejlek

Description

@dejlek

This issue was mentioned to me by a developer who was learning giD. He was working on a .desktop files GUI editor, and found that LSP is not giving completion for the quit() method of GIO Application subclass.

I then tried to verify that by testing LSP on the following line:

https://codeberg.org/dejan/dterm/src/commit/1a7bef9488bcc5e6642b699d431870252c383d22/source/dterm/ui/application.d#L53

I also got the latest serve-d and used IDEA, Zed and VSCode, and no completion there. I am not eliminating possibility that something in giD code is making LSP get confused, but still, completion should work as the call to quit() there is legit.

So far the only way to reproduce the issue is to open dterm, go to the line I mentioned above, and you will see that completion does not work.

PS. is there an easy way to test serve-d directly, not via an IDE?

I tried to reproduce the problem with the D test below, but the completion for quit() works. So it must be something else...

import std.stdio;

class BaseApplication {
    /** Call to quit */
    void quit() {
        done = true;
    }
}

class Application: BaseApplication {
    int foo = 42;
    bool done = false;
    this() {
        writeln("Application initialized");
    }
}

class MyApplication: Application {
    this() {
        super();
        foo = 100;
    }
}

void main() {
    auto app = new MyApplication();
    app.quit();  // completion here works!
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions