www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18136] New: ICE in dmd/statement.d(426)

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

          Issue ID: 18136
           Summary: ICE in dmd/statement.d(426)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Keywords: ice
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

```
void main()
{
    import std.regex;
    import std.algorithm : joiner, map;
    string[] messages;

    auto matchToRefs(M)(M m)
    {
        return m.captures[0].splitter(regex(`foo`));
    }

    auto issueRE = regex("foo");
    messages.map!(
        m => m.matchAll(issueRE)
              .map!matchToRefs
    ).joiner;
}
```

Stacktrace:


```
core.exception.AssertError dmd/statement.d(426): Assertion failure
----------------
??:? _d_assert [0xce1a2ef0]
??:? void dmd.statement.__assert(int) [0xce09fba2]
??:? dmd.statement.ErrorStatement dmd.statement.ErrorStatement.__ctor()
[0xce09b4a7]
??:? _ZN16Semantic3Visitor5visitEP15FuncDeclaration [0xcdfd15c0]
??:? _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP22FuncLiteralDeclaration
[0xce0a9459]
??:? _ZN22FuncLiteralDeclaration6acceptEP7Visitor [0xce02c568]
??:? _Z9semantic3P7DsymbolP5Scope [0xce09a2e0]
??:? _ZN25ExpressionSemanticVisitor5visitEP7FuncExp [0xce00f3ae]
??:? _ZN7FuncExp6acceptEP7Visitor [0xce001c20]
??:? _Z18expressionSemanticP10ExpressionP5Scope [0xce023716]
??:? _ZN10TypeTypeof7resolveE3LocP5ScopePP10ExpressionPP4TypePP7Dsymbolb
[0xce072c7e]
??:? _ZN19TypeSemanticVisitor5visitEP10TypeTypeof [0xce0a3e20]
??:? _ZN10TypeTypeof6acceptEP7Visitor [0xce072fb0]
??:? _Z12typeSemanticP4Type3LocP5Scope [0xce0a0c22]
??:? _ZN4Type11trySemanticE3LocP5Scope [0xce06795b]
??:? _ZN25ExpressionSemanticVisitor5visitEP5IsExp [0xce0139f7]
??:? _ZN5IsExp6acceptEP7Visitor [0xce002118]
??:? _Z18expressionSemanticP10ExpressionP5Scope [0xce023716]
??:? _ZN25ExpressionSemanticVisitor5visitEP10LogicalExp [0xce021647]
??:? _ZN10LogicalExp6acceptEP7Visitor [0xce006500]
??:? _Z18expressionSemanticP10ExpressionP5Scope [0xce023716]
??:? _ZN25ExpressionSemanticVisitor5visitEP10LogicalExp [0xce021535]
??:? _ZN10LogicalExp6acceptEP7Visitor [0xce006500]
??:? _Z18expressionSemanticP10ExpressionP5Scope [0xce023716]
??:? _ZN25ExpressionSemanticVisitor5visitEP10LogicalExp [0xce021535]
??:? _ZN10LogicalExp6acceptEP7Visitor [0xce006500]
??:? _Z18expressionSemanticP10ExpressionP5Scope [0xce023716]
??:? _ZN22DsymbolSemanticVisitor5visitEP14VarDeclaration [0xcdfd6a35]
??:? _ZN14VarDeclaration6acceptEP7Visitor [0xcdfa3998]
??:? _Z15dsymbolSemanticP7DsymbolP5Scope [0xcdfcee08]
??:? _ZN16TemplateInstance13expandMembersEP5Scope [0xcdff36eb]
??:? _ZN16TemplateInstance16tryExpandMembersEP5Scope [0xcdff3762]
??:? void
dmd.dsymbolsem.templateInstanceSemantic(dmd.dtemplate.TemplateInstance,
dmd.dscope.Scope*, dmd.root.array.Array!(dmd.expression.Expression).Array*)
[0xcdfe256b]
```

--
Dec 27 2017