[Issue 6330] Cannot disable assignment to a struct.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 13 06:29:41 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6330
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Platform|Other |All
OS/Version|Windows |All
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2011-11-13 06:28:58 PST ---
https://github.com/D-Programming-Language/dmd/pull/508
This is parser issue, that the postfix @disable attribute is ignored.
The workaround is moving @disable into head.
struct S {
@disable void opAssign(S s){
assert(0); // This fails.
}
}
void main() {
S s;
S s2;
s2 = s;
// Error: function test.S.opAssign is not callable because it is annotated
with @disable
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list