[Issue 21472] New: `-checkaction=context` doesn't work with `tupleof`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 11 16:50:50 UTC 2020


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

          Issue ID: 21472
           Summary: `-checkaction=context` doesn't work with `tupleof`
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: pro.mathias.lang at gmail.com

```
struct Var { int a, b; }

void main ()
{
    Var v;
    assert(v.tupleof == v.tupleof);
}
```

Results in:
```
testc.d(6): Error: template core.internal.dassert._d_assert_fail cannot deduce
function from argument types !("==", int, int, int, int)(int, int, int, int),
candidates are:
./generated/osx/debug/64/../../../../../druntime/import/core/internal/dassert.d(8):
       _d_assert_fail(string op, A)(auto ref scope const A a)
./generated/osx/debug/64/../../../../../druntime/import/core/internal/dassert.d(16):
       _d_assert_fail(string comp, A, B)(auto ref scope const A a, auto ref
scope const B b)
```

--


More information about the Digitalmars-d-bugs mailing list