www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11460] New: ICE for opDispatch and UFCS function (2.064)

https://d.puremagic.com/issues/show_bug.cgi?id=11460

           Summary: ICE for opDispatch and UFCS function (2.064)
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: daniel350 bigpond.com


--- Comment #0 from daniel350 bigpond.com 2013-11-06 23:26:20 PST ---
import std.algorithm : all;

auto func(in foo v) {
    return 0;
}

struct foo {
    float x;

    auto opDispatch(string str)() if (str.all!(x => false)) {
        return this;
    }
}

void main() {
    foo(1).func();
//    func(foo(1)); // Fine
}


The above code produces the following ICE: dmd: glue.c:598: virtual void
FuncDeclaration::toObjFile(int): Assertion `ident != Id::empty' failed.

Reduced it as much as I had time to.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 06 2013