Bug 1376 – 2.003 const object within class

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2007-07-25T17:08:00Z
Last change time
2015-06-09T01:04:59Z
Assigned to
bugzilla
Creator
Daniel919

Comments

Comment #0 by Daniel919 — 2007-07-25T17:08:17Z
class A { } class B { //A a; // [OK] //const A a; // Error: this.a is not mutable [OK] //final const(A) a; // [OK] const(A) a; // Error: cannot modify const/invariant this.a [should work] this(A a) { this.a = a; } }
Comment #1 by clugdbug — 2008-06-24T02:06:43Z
Works in DMD2.015