Hello, I have the next code (minimized with DustMite):

struct Tup(T...)
{
    bool opEquals()     {
        foreach (i; T)
static if (__traits(compiles, mixin("new InputRangeObject11261!(abs_class)")))
msg;
    }
}

/**********************************************/

void test3()
{
    Tup!(int, double) ;
}

interface InputRange11261(E)
{
}
template InputRangeObject11261(R)
{
    alias typeof(init.front()) E;

    class InputRangeObject11261 : InputRange11261!E
    {
    }
}

class abs_class
{
}


The problem that I'm compiling dmd v2.083.1 and the version which built I gives me the next error:

---
ERROR: This is a compiler bug.
Please report it via https://issues.dlang.org/enter_bug.cgi
with, preferably, a reduced, reproducible example and the information below. DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the reduction.
---
DMD v2.083.1
predefs DigitalMars Posix linux ELFv1 CRuntime_Glibc CppRuntime_Gcc LittleEndian D_Version2 all D_SIMD D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat
binary    dmd
version   v2.083.1
config /mnt/raid/system/home/undefer/MyFiles/Sources/D/dmd/generated/linux/release/64/dmd.conf DFLAGS -I/mnt/raid/system/home/undefer/MyFiles/Sources/D/dmd/generated/linux/release/64/../../../../../druntime/import -I/mnt/raid/system/home/undefer/MyFiles/Sources/D/dmd/generated/linux/release/64/../../../../../phobos -L-L/mnt/raid/system/home/undefer/MyFiles/Sources/D/dmd/generated/linux/release/64/../../../../../phobos/generated/linux/release/64 -L--export-dynamic -fPIC
---
core.exception.AssertError@dmd/dsymbolsem.d(5356): Assertion failure
----------------
??:? _d_assertp [0xf0233ed]
dmd/dsymbolsem.d:5356 _ZN22DsymbolSemanticVisitor5visitEP20InterfaceDeclaration [0xee4c9a0] dmd/dclass.d:1129 _ZN20InterfaceDeclaration6acceptEP7Visitor [0xee0a439] dmd/dsymbolsem.d:378 _Z15dsymbolSemanticP7DsymbolP5Scope [0xee3d538] dmd/dtemplate.d:7427 void dmd.dtemplate.TemplateInstance.expandMembers(dmd.dscope.Scope*) [0xee5ff53] dmd/dtemplate.d:7445 void dmd.dtemplate.TemplateInstance.tryExpandMembers(dmd.dscope.Scope*) [0xee5ffca] dmd/dsymbolsem.d:5671 void dmd.dsymbolsem.templateInstanceSemantic(dmd.dtemplate.TemplateInstance, dmd.dscope.Scope*, dmd.root.array.Array!(dmd.expression.Expression).Array*) [0xee4d3ce] dmd/dsymbolsem.d:2573 _ZN22DsymbolSemanticVisitor5visitEP16TemplateInstance [0xee443be] dmd/dtemplate.d:7474 _ZN16TemplateInstance6acceptEP7Visitor [0xee60085] dmd/dsymbolsem.d:378 _Z15dsymbolSemanticP7DsymbolP5Scope [0xee3d538] dmd/typesem.d:2676 _ZN14ResolveVisitor5visitEP12TypeInstance [0xef1399c]
dmd/mtype.d:5189 _ZN12TypeInstance6acceptEP7Visitor [0xeee1519]
dmd/typesem.d:2418 void dmd.typesem.resolve(dmd.mtype.Type, ref const(dmd.globals.Loc), dmd.dscope.Scope*, dmd.expression.Expression*, dmd.mtype.Type*, dmd.dsymbol.Dsymbol*, bool) [0xef12f1f] dmd/typesem.d:1608 _ZN19TypeSemanticVisitor5visitEP12TypeInstance [0xef113e8]
dmd/mtype.d:5189 _ZN12TypeInstance6acceptEP7Visitor [0xeee1519]
dmd/typesem.d:533 _Z12typeSemanticP4Type3LocP5Scope [0xef0e0b6]
dmd/dsymbolsem.d:4515 pure @nogc @safe dmd.mtype.Type dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dclass.ClassDeclaration).__dgliteral2() [0xee4ba59] dmd/dsymbolsem.d:4497 dmd.mtype.Type dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dclass.ClassDeclaration).resolveBase!(dmd.mtype.Type).resolveBase(lazy dmd.mtype.Type) [0xee4e220] dmd/dsymbolsem.d:4515 _ZN22DsymbolSemanticVisitor5visitEP16ClassDeclaration [0xee49cc4] dmd/dclass.d:986 _ZN16ClassDeclaration6acceptEP7Visitor [0xee0a00d] dmd/dsymbolsem.d:378 _Z15dsymbolSemanticP7DsymbolP5Scope [0xee3d538] dmd/dtemplate.d:7427 void dmd.dtemplate.TemplateInstance.expandMembers(dmd.dscope.Scope*) [0xee5ff53] dmd/dtemplate.d:7445 void dmd.dtemplate.TemplateInstance.tryExpandMembers(dmd.dscope.Scope*) [0xee5ffca] dmd/dsymbolsem.d:5671 void dmd.dsymbolsem.templateInstanceSemantic(dmd.dtemplate.TemplateInstance, dmd.dscope.Scope*, dmd.root.array.Array!(dmd.expression.Expression).Array*) [0xee4d3ce] dmd/dsymbolsem.d:2573 _ZN22DsymbolSemanticVisitor5visitEP16TemplateInstance [0xee443be] dmd/dtemplate.d:7474 _ZN16TemplateInstance6acceptEP7Visitor [0xee60085] dmd/dsymbolsem.d:378 _Z15dsymbolSemanticP7DsymbolP5Scope [0xee3d538] dmd/typesem.d:2676 _ZN14ResolveVisitor5visitEP12TypeInstance [0xef1399c]
dmd/mtype.d:5189 _ZN12TypeInstance6acceptEP7Visitor [0xeee1519]
dmd/typesem.d:2418 void dmd.typesem.resolve(dmd.mtype.Type, ref const(dmd.globals.Loc), dmd.dscope.Scope*, dmd.expression.Expression*, dmd.mtype.Type*, dmd.dsymbol.Dsymbol*, bool) [0xef12f1f] dmd/typesem.d:1608 _ZN19TypeSemanticVisitor5visitEP12TypeInstance [0xef113e8]
dmd/mtype.d:5189 _ZN12TypeInstance6acceptEP7Visitor [0xeee1519]
dmd/typesem.d:533 _Z12typeSemanticP4Type3LocP5Scope [0xef0e0b6]
dmd/expressionsem.d:3094 _ZN25ExpressionSemanticVisitor5visitEP6NewExp [0xee7cb92]
dmd/expression.d:3171 _ZN6NewExp6acceptEP7Visitor [0xee6bad1]
dmd/expressionsem.d:10518 _Z18expressionSemanticP10ExpressionP5Scope [0xee9367e] dmd/expressionsem.d:5349 _ZN25ExpressionSemanticVisitor5visitEP10CompileExp [0xee84945]
dmd/expression.d:4249 _ZN10CompileExp6acceptEP7Visitor [0xee6e68d]
dmd/expressionsem.d:10518 _Z18expressionSemanticP10ExpressionP5Scope [0xee9367e] dmd/traits.d:1525 dmd.expression.Expression dmd.traits.semanticTraits(dmd.expression.TraitsExp, dmd.dscope.Scope*) [0xef1e4c0] dmd/expressionsem.d:4846 _ZN25ExpressionSemanticVisitor5visitEP9TraitsExp [0xee83078]
dmd/expression.d:3757 _ZN9TraitsExp6acceptEP7Visitor [0xee6d121]
dmd/expressionsem.d:10518 _Z18expressionSemanticP10ExpressionP5Scope [0xee9367e] dmd/staticcond.d:83 bool dmd.staticcond.evalStaticCondition(dmd.dscope.Scope*, dmd.expression.Expression, dmd.expression.Expression, ref bool) [0xef3816f]
dmd/cond.d:854 _ZN17StaticIfCondition7includeEP5Scope [0xede9440]
dmd/statement.d:1463 _ZN20ConditionalStatement7flattenEP5Scope [0xef0932e] dmd/statementsem.d:227 _ZN24StatementSemanticVisitor5visitEP17CompoundStatement [0xef27d03] dmd/statement.d:956 _ZN17CompoundStatement6acceptEP7Visitor [0xef08325] dmd/statementsem.d:125 _Z17statementSemanticP9StatementP5Scope [0xef279b2] dmd/statementsem.d:428 _ZN24StatementSemanticVisitor5visitEP14ScopeStatement [0xef28804] dmd/statement.d:1069 _ZN14ScopeStatement6acceptEP7Visitor [0xef0872d] dmd/statementsem.d:125 _Z17statementSemanticP9StatementP5Scope [0xef279b2] dmd/statementsem.d:402 _ZN24StatementSemanticVisitor5visitEP21UnrolledLoopStatement [0xef286cd] dmd/statement.d:1022 _ZN21UnrolledLoopStatement6acceptEP7Visitor [0xef085b9] dmd/statementsem.d:125 _Z17statementSemanticP9StatementP5Scope [0xef279b2] dmd/statementsem.d:1153 _ZN24StatementSemanticVisitor5visitEP16ForeachStatement [0xef29608] dmd/statement.d:1346 _ZN16ForeachStatement6acceptEP7Visitor [0xef08f1d] dmd/statementsem.d:125 _Z17statementSemanticP9StatementP5Scope [0xef279b2] dmd/statementsem.d:234 _ZN24StatementSemanticVisitor5visitEP17CompoundStatement [0xef27d77] dmd/statement.d:956 _ZN17CompoundStatement6acceptEP7Visitor [0xef08325] dmd/statementsem.d:125 _Z17statementSemanticP9StatementP5Scope [0xef279b2] dmd/semantic3.d:571 _ZN16Semantic3Visitor5visitEP15FuncDeclaration [0xef3c922]
dmd/func.d:2377 _ZN15FuncDeclaration6acceptEP7Visitor [0xee9ae0d]
dmd/semantic3.d:82 _Z9semantic3P7DsymbolP5Scope [0xef3b27c]
dmd/semantic3.d:1376 _ZN16Semantic3Visitor5visitEP20AggregateDeclaration [0xef3f886] dmd/parsetimevisitor.d:83 _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP17StructDeclaration [0xef20b75] dmd/dstruct.d:597 _ZN17StructDeclaration6acceptEP7Visitor [0xee37561]
dmd/semantic3.d:82 _Z9semantic3P7DsymbolP5Scope [0xef3b27c]
dmd/semantic3.d:132 _ZN16Semantic3Visitor5visitEP16TemplateInstance [0xef3b41c] dmd/dtemplate.d:7474 _ZN16TemplateInstance6acceptEP7Visitor [0xee60085]
dmd/semantic3.d:82 _Z9semantic3P7DsymbolP5Scope [0xef3b27c]
dmd/dtemplate.d:7462 void dmd.dtemplate.TemplateInstance.trySemantic3(dmd.dscope.Scope*) [0xee6003e] dmd/dsymbolsem.d:5749 void dmd.dsymbolsem.templateInstanceSemantic(dmd.dtemplate.TemplateInstance, dmd.dscope.Scope*, dmd.root.array.Array!(dmd.expression.Expression).Array*) [0xee4d5cc] dmd/dsymbolsem.d:2573 _ZN22DsymbolSemanticVisitor5visitEP16TemplateInstance [0xee443be] dmd/dtemplate.d:7474 _ZN16TemplateInstance6acceptEP7Visitor [0xee60085] dmd/dsymbolsem.d:378 _Z15dsymbolSemanticP7DsymbolP5Scope [0xee3d538] dmd/expressionsem.d:2961 _ZN25ExpressionSemanticVisitor5visitEP8ScopeExp [0xee7c682]
dmd/expression.d:3078 _ZN8ScopeExp6acceptEP7Visitor [0xee6b7a5]
dmd/expressionsem.d:10518 _Z18expressionSemanticP10ExpressionP5Scope [0xee9367e] dmd/statementsem.d:176 _ZN24StatementSemanticVisitor5visitEP12ExpStatement [0xef27ac9]
dmd/statement.d:736 _ZN12ExpStatement6acceptEP7Visitor [0xef07a2d]
dmd/statementsem.d:125 _Z17statementSemanticP9StatementP5Scope [0xef279b2] dmd/statementsem.d:234 _ZN24StatementSemanticVisitor5visitEP17CompoundStatement [0xef27d77] dmd/statement.d:956 _ZN17CompoundStatement6acceptEP7Visitor [0xef08325] dmd/statementsem.d:125 _Z17statementSemanticP9StatementP5Scope [0xef279b2] dmd/semantic3.d:571 _ZN16Semantic3Visitor5visitEP15FuncDeclaration [0xef3c922]
dmd/func.d:2377 _ZN15FuncDeclaration6acceptEP7Visitor [0xee9ae0d]
dmd/semantic3.d:82 _Z9semantic3P7DsymbolP5Scope [0xef3b27c]
dmd/semantic3.d:195 _ZN16Semantic3Visitor5visitEP6Module [0xef3b66f]
dmd/dmodule.d:1271 _ZN6Module6acceptEP7Visitor [0xee2c7a5]
dmd/semantic3.d:82 _Z9semantic3P7DsymbolP5Scope [0xef3b27c]
dmd/mars.d:641 int dmd.mars.tryMain(ulong, const(char)**) [0xeed311e]
dmd/mars.d:900 _Dmain [0xeed42a6]


But the version from deb-file from the site gives me nice error:

aliasthis.d(3): Error: function `aliasthis.Tup!(int, double).Tup.opEquals` has no return statement, but is expected to return a value of type bool aliasthis.d(14): Error: template instance `aliasthis.Tup!(int, double)` error instantiating

What I could build wrong and how to build dmd properly?

Reply via email to