Menu
Home
Create new Paste
Log in
Code
Theme: cobalt
Theme: eclipse
Theme: elegant
Theme: monokai
Theme: neat
Theme: night
Theme: rubyblue
import std.stdio; static if (!is(typeof(writeln))) alias writefln writeln; class A { public: override string toString() const { return typeof(this).stringof; } } void main() { const(A)[int] aas; const A a = new A(); aas[0] = a; aas[1] = new A(); writeln(aas); }
Result:
Compilation error
/
Return code: 1 (Hangup)
/
Compilation time:
0.347
seconds
Compilation output:
/home/c407/c93.d(20): Error: aas[0] isn't mutable
/home/c407/c93.d(21): Error: aas[1] isn't mutable
Username
Message
Add comment
Paste info
Author:
Namespace
Views:
89
Private:
no
Expires:
Never
Uploaded:
15.11.12 21:57
Votes
:
0
Tweet
Compilation
Compiler:
DMD 2.060
Pointer size:
m64
Actions
Download
Fork
Raw
×
Confirm
Are you sure you want to delete this paste?
There's no way back!
×
Confirm
Reason