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

Simen Kjaeraas <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Simen Kjaeraas <[email protected]> ---
Reduced:

class C {
    __gshared C global;
}


void fun(void* v) {}

void main() {
    C var;
    fun(var.global);
}


Works with class or struct.
If I change the type of global to C* it compiles.
If I call fun(C.global), it gives an error message and does not crash.
If fun is void fun(C c) {}, it compiles.
Assigning void* p = var.global; gives an error message and does not crash.

--

Reply via email to