[Issue 22949] New: compiler error: struct with __traits(compiles, this.init), nonexistent import mixin, main calls nonexistent enum from other module
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Mar 28 13:06:57 UTC 2022
    
    
  
https://issues.dlang.org/show_bug.cgi?id=22949
          Issue ID: 22949
           Summary: compiler error: struct with __traits(compiles,
                    this.init), nonexistent import mixin, main calls
                    nonexistent enum from other module
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: default_357-line at yahoo.de
... leads to "Error: unknown."
This may win points for most esoteric repro steps ever.
And yes, this is dustmited from real code. Not AFL.
Consider a test.d:
struct Struct
{
    enum e = __traits(compiles, Struct.init);
    import test2 : NonexistentSymbol;
    mixin NonexistentSymbol;
}
import test2;
void main() { bla; }
And a test2.d:
enum bla = bloop;
Then
Error: unknown, please file report on issues.dlang.org
( see https://run.dlang.io/is/CXi4df )
--
    
    
More information about the Digitalmars-d-bugs
mailing list