digitalmars.D.bugs - [Issue 16160] New: selective imports in aggregation shadow property
- via Digitalmars-d-bugs (28/28) Jun 10 2016 https://issues.dlang.org/show_bug.cgi?id=16160
https://issues.dlang.org/show_bug.cgi?id=16160 Issue ID: 16160 Summary: selective imports in aggregation shadow property functions Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: rburners gmail.com struct Foo { import std.array : empty; property bool empty() { return true; } } unittest { Foo f; assert(f.empty); } Error: expression f.empty of type void does not have a boolean value It seams like the import of std.array.empty is shadowing the empty property. Moving the import out of the struct fixes the problem. --
Jun 10 2016