[Issue 13284] New: [dmd 2.066-rc2] Cannot match shared classes at receive

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Aug 11 06:15:39 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13284

          Issue ID: 13284
           Summary: [dmd 2.066-rc2] Cannot match shared classes at receive
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: NCrashed at gmail.com

Now cannot match shared classes at receive callbacks (will fallback to Variant
case):
```
import std.stdio;
import std.concurrency;
import core.time;

shared class A {}

void thread()
{
    while(true)
    {
        receiveTimeout(dur!"msecs"(1000), 
                          (shared(A) a) { writeln("Got a!"); return; }
                        , (Variant v) { assert(false, "Unknown message!"); });
    }
}

void main()
{
    auto tid = spawn(&thread);

    auto a = new shared A();
    tid.send(a);
}
```

Platform: 3.15.8-200.fc20.x86_64
dmd: DMD64 D Compiler v2.066.0-rc2

--


More information about the Digitalmars-d-bugs mailing list