[Issue 20719] Self referential struct definition causes stack overflow
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Apr 15 03:05:45 UTC 2020
    
    
  
https://issues.dlang.org/show_bug.cgi?id=20719
--- Comment #4 from moonlightsentinel at disroot.org ---
Without error message:
================================
struct SumType
{
    alias Types = AliasSeq!(typeof(this));
    union Storage
    {
        Types[0] t;
    }
    Storage storage;
    static if (isCopyable!(Types[0])) {}
    static if (isAssignable!(Types[0])) {}
}
alias AliasSeq(TList...) = TList;
enum isAssignable(Rhs) = __traits(compiles, lvalueOf = rvalueOf!Rhs);
struct __InoutWorkaroundStruct {}
T rvalueOf(T)();
T lvalueOf()(__InoutWorkaroundStruct);
enum isCopyable(S) = { S foo; };
=====================================
Both original and reduction cause a segfault for me.
--
    
    
More information about the Digitalmars-d-bugs
mailing list