[Issue 16035] Compiler error when compiling specific union
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue May 17 08:36:17 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16035
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice |ice-on-invalid-code
--- Comment #3 from Steven Schveighoffer <schveiguy at yahoo.com> ---
It has something to do with inout, not with unions.
Reduced case:
struct Value {
auto toString() inout {
get!string;
}
T get(T)() {
a[0].toString();
}
const(Value)* a;
}
Remove inout, and this fails to compile:
testunion.d(7): Error: mutable method testunion.Value.toString is not callable
using a const object
testunion.d(3): Error: template instance testunion.Value.get!string error
instantiating
--
More information about the Digitalmars-d-bugs
mailing list