BetterC is so much bugs, is Walter really use it in DMD?

rikki cattermole rikki at cattermole.co.nz
Thu Oct 25 13:28:22 UTC 2018


After minimizing it myself (at the end), I think that you're running 
into https://issues.dlang.org/show_bug.cgi?id=18457

struct Node {}
struct Proxy {
     ~this() {
     	count++;
     }

	Node* n;
}

ref auto something(Node* p){
     auto value = Proxy(p);
     return value;
}

__gshared int count;

extern(C) void main() {
     Node n;
     something(&n);
     assert(count == 1);
}


More information about the Digitalmars-d mailing list