[Issue 18563] context pointer inside structs constness problems

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18563

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--


[Issue 18563] context pointer inside structs constness problems

2018-07-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18563

Timoses  changed:

   What|Removed |Added

 CC||timos...@gmail.com

--- Comment #1 from Timoses  ---
Related: https://forum.dlang.org/post/rxolioihwfrljpfjf...@forum.dlang.org

// dmd v2.081.1
unittest {
struct S {
uint value;
~this() pure {
}
}
S makeS() pure
{
S s = S();
return s;
}
// Error: cannot implicitly convert expression makeS() of type S to
immutable(S)
immutable S s = makeS();
}

Without the destructor compiles fine.

Perhaps a better error message could be found.

Further related issue: https://issues.dlang.org/show_bug.cgi?id=18567

--


[Issue 18563] context pointer inside structs constness problems

2018-03-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18563

Ketmar Dark  changed:

   What|Removed |Added

 CC||ket...@ketmar.no-ip.org

--