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.
Worth noting that before https://github.com/dlang/dmd/pull/2417, the error message made a bit more sense: test.d(4): Error: function test.Foo.empty conflicts with alias test.Foo.empty at test.d(2) The current error message mentions that f.empty is of type void, which is misleading.
Works with parens: assert(f.empty()); Because the compiler can figure out that empty() is a member func, beforehand. And @property can be dropped from the test case.
Not anymore. This code compiles now. Closing as WORKSFORME.