www.digitalmars.com         C & C++   DMDScript  

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

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 puremagic.com
          Reporter: pro.mathias.lang 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)
```

--
Dec 11 2020