[Issue 24089] New: Error: Unknown for bad ordering of struct/function instantiation with sema error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 17 14:10:34 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=24089

          Issue ID: 24089
           Summary: Error: Unknown for bad ordering of struct/function
                    instantiation with sema error
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: default_357-line at yahoo.de

Given this code:

```
void fun()
{
    enum e = __traits(compiles, templateFun());

    Foo!() a;

    a.bar.baz();
}

struct Foo() { Bar!() bar; }

void templateFun()() { Foo!(); }

struct Bar()
{
    void baz()() { }
    void erroring() { BREAK_SEMA; }
}
```

DMD says "Error: unknown, please file report on issues.dlang.org".
Somehow the particular ordering of __traits(compiles) swallows the "undefined
identifier BREAK_SEMA" error with no sign.

--


More information about the Digitalmars-d-bugs mailing list