dlang-community / D-Scanner

Swiss-army knife for D source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discarded return value warning does not work for aliased types

zyedidia opened this issue · comments

If a type is aliased, using a static method on the aliased type does not generate a warning if the return value is discarded:

struct Foo {
    static bool val() {
        return false;
    }
}

alias X = Foo;

void main() {
    Foo.val(); // warning
    X.val();   // no warning
}

looks like an alias issue in dsymbol, see https://github.com/dlang-community/DCD/issues