Bug 2283 – protection attributes are not respected for struct opAssign

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-08-14T09:59:00Z
Last change time
2015-06-09T01:31:15Z
Assigned to
bugzilla
Creator
2korden

Comments

Comment #0 by 2korden — 2008-08-14T09:59:47Z
struct Test { int i; private void opAssign(int i) { this.i = i; } } void main() { Test test; test = 42; // accepted }
Comment #1 by smjg — 2008-11-24T09:24:42Z
The access is in the same module, therefore this is allowed. If they are placed in different modules, it fails as expected (1.036, 2.019).