www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18020] New: [Reg 2.078] no property opCmp for anon class

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

          Issue ID: 18020
           Summary: [Reg 2.078] no property opCmp for anon class
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P3
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
void bug(T)(T t)
{
    t.opCmp(t);
}

alias bugi = bug!(typeof(new class{}));
CODE
dmd -c -o- bug.d
----
bug.d(3): Error: no property 'opCmp' for type 'bug.__anonclass1'
bug.d(6): Error: template instance bug.bug!(__anonclass1) error instantiating
----

Introduced by https://github.com/dlang/dmd/pull/7315.

--
Nov 29