[Issue 21235] Undefined reference with circular opEquals between two templates, one of which has an error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 10 13:47:53 UTC 2020


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

--- Comment #1 from FeepingCreature <default_357-line at yahoo.de> ---
Simplification.

```
struct Template {
    void opEquals(U, this TA)(U) {
        pragma(msg, "Template.opEquals!(" ~ U.stringof ~ ", " ~ TA.stringof ~
")");
        foo();
    }
}

void foo()() {
    static assert(false); // we never even compile this.
    return Template().opEquals(Template()); // but this is still needed
}

void main() { }
```

--


More information about the Digitalmars-d-bugs mailing list