[Issue 8192] inconsistent behavior of initialized immutable instance fields
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jun 3 10:21:32 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8192
--- Comment #1 from timon.gehr at gmx.ch 2012-06-03 10:23:29 PDT ---
Better test case:
struct S{ immutable y = 1; }
void main(){
assert(S.y==1); // ok
assert(&S.y!is null); // compile error
with(S){
assert(&y!is null); // ok
assert(*&y==y); // fail
}
}
--
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