[Issue 17733] idup fails for structs/classes with member functions

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17733

Steven Schveighoffer  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||schvei...@yahoo.com
 Resolution|--- |INVALID

--- Comment #1 from Steven Schveighoffer  ---
This is because in the first case, S has a hidden context pointer to the stack
frame of main().

If you mark it as a static struct, you will not have this problem.

Note that the ultimate reason it fails is because any items that have
indirections cannot be implicitly converted to immutable.

--


[Issue 17733] idup fails for structs/classes with member functions

2017-08-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17733

Anton Fediushin  changed:

   What|Removed |Added

  Component|druntime|dmd

--