Bug 6494 – alias to const type in struct results in strange error
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-08-14T11:54:00Z
Last change time
2011-10-26T04:55:19Z
Keywords
diagnostic, rejects-valid
Assigned to
nobody
Creator
hoganmeier
Comments
Comment #0 by hoganmeier — 2011-08-14T11:54:17Z
struct Blub
{
alias const(void*) T;
~this() {}
invariant() {}
}
$ dmd -c wrapper.d
DMD v2.054 DEBUG
Error: __result = this is not mutable
Error: __result = this is not an lvalue
Somehwat related to bug 5690 but this one doesn't show an error location and there is no "real" const member, just an alias.
Comment #1 by k.hara.pg — 2011-08-14T12:13:08Z
I think this is bug 3273, and it is already fixed in master.
Your sample code pass compile with trunk dmd.