On Friday, 16 May 2014 at 20:36:37 UTC, Ali Çehreli wrote:
My apologies. The code was written for an older version of dmd.
The simplest fix is to define the constructor as pure:
pure this(int num) {
this.num = num;
}
Ali
Ahh great thanks guys.
No worries Ali, great book,
trying to follow:
http://ddili.org/ders/d.en/class.html
//--- OSX 10.9 DMD 2.065
module test;
class Foo {
int num;
this(int num) {
this.num = num;
}
Foo dup() const {
return new Foo(this.num);
}
immutable(Foo) idup() const {
return new
Hi Charles,
would the following work (just a shot in the dark) ?
//---
module test;
import std.stdio;
import std.concurrency;
void spawnedFuncFoo(Tid tid, Tid tidBar) {
receive(
(int i) {
writeln("Foo Received the number ", i);
send(tidBar, i, thisTid);
FYI:
If anyone is using GitHub's text editor "Atom" and would like
basic D syntax highlighting:
apm init --package ~/.atom/packages/language-d --convert
https://github.com/textmate/d.tmbundle
https://atom.io/docs/v0.94.0/converting-a-text-mate-bundle