https://issues.dlang.org/show_bug.cgi?id=11761
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Kenji Hara <[email protected]> --- (In reply to Vladimir Panteleev from comment #0) > The cause can be reduced to the following code: > > struct R > { > R save() { return this; } > } > > void main() > { > R r1 = void; > static assert (is(typeof(r1.save) == typeof(r1))); > } > > The compiler complains: > > test.d(9): Error: static assert (is(R() == R)) is false > > Note the parens in "R() == R". > > The problem goes away, if either r1.save is replaced with r1.save(), or the > save method declaration is annotated with @property (despite the -property > switch not being used). The compiler behavior issue is now filed in bug 13293. --
