[Issue 15571] .dup is incompatible with self referencing structs
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Sat Jan 16 15:22:45 PST 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=15571
ag0aep6g at gmail.com changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0aep6g at gmail.com
--- Comment #1 from ag0aep6g at gmail.com ---
Compiles fine when Node is not in a unittest (or other kind of function):
----
template Wrapper(T) {
  struct Wrapper {
    private T[] _holder;
    this(this) {
      _holder = _holder.dup;
    }
  }
}
struct Node {
  Wrapper!Node next;
}
----
--
    
    
More information about the Digitalmars-d-bugs
mailing list