www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20602] New: [REG2.086] ICE on wrong code


          Issue ID: 20602
           Summary: [REG2.086] ICE on wrong code
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: johanengelen weka.io

Before 2.086 this code would simply error. But now it crashes the compiler.
import std;

auto ggg(Func)(Func func) { func(); }

nogc foo()() { }

void someOp(T)() {
    try { }
    catch foo;
    try ggg(() => msg);
    catch boo;

struct S(T) {
    T slice() inout { someOp!int(); }
    void opAssign()(U) {}
    alias slice this;

struct ClusterInfo {
     UDA() UUID guid;
     UDA() S!(char) name;

The original code triggering the crash was much more complex, but the compiler
crashes at the same point. An assert is triggered; with LDC it is this assert:

Feb 23 2020