www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18908] New: Cannot pass concurrency message with a shared and

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

          Issue ID: 18908
           Summary: Cannot pass concurrency message with a shared and a
                    const, useless error message
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: zorael gmail.com

https://run.dlang.io/is/rZC5kD

-------------

import std.concurrency;

class Class {}

struct Struct {}

void fun(shared Class class_, const Struct struct_) {}

void main()
{
    shared Class class_;
    const Struct struct_;

    thisTid.send(class_, struct_);

    receive(&fun);
}

-------------

core.exception.AssertError /dlang/dmd/linux/bin64/../../src/phobos/std/variant.d(323):
Tuple!(shared(Class), const(Struct))

--
May 26 2018