← Back to index
|
Original Bugzilla link
Bug 23151 – ICE: core.exception.AssertError@src/dmd/aggregate.d(678): Assertion failure
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-06-01T02:00:24Z
Last change time
2023-01-01T06:25:10Z
Keywords
pull
Assigned to
No Owner
Creator
Richard Cattermole
Comments
Comment #0
by alphaglosined — 2022-06-01T02:00:24Z
From:
https://forum.dlang.org/post/
[email protected]
```d interface I { void intfunc(int x); } auto makeBaseObj() { int realPrivateX; class Base : I { private int modulePrivateX; int publicX; override void intfunc(int x) { realPrivateX++; // expected OK } } return new Base; } auto makeDerivedObj() { int realPrivateY; class Derived : typeof(makeBaseObj()) { private int modulePrivateY; int publicY; override void intfunc(int x) { realPrivateX++; // expected NG modulePrivateX++; } } return new Derived; } ``` Output: /tmp/test.d(20): Error: class `test.makeDerivedObj.Derived` is nested within `makeDerivedObj`, but super class `Base` is nested within `makeBaseObj` --- 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.098.1-1176-g005d97cb4 predefs DigitalMars LittleEndian D_Version2 all D_SIMD Posix ELFv1 linux CRuntime_Glibc CppRuntime_Gcc D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC assert D_PreConditions D_PostConditions D_Invariants D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat binary dmd version v2.098.1-1176-g005d97cb4 config /usr/src/d/bin/dmd.conf DFLAGS -I/usr/src/d/druntime/import -I/usr/src/d/druntime/src -I/usr/src/d/phobos -L-L/usr/src/d/phobos/generated/linux/release/32 -L-L/usr/src/d/phobos/generated/linux/release/64 -L--no-warn-search-mismatch -L--export-dynamic -fPIC --- core.exception.AssertError@src/dmd/aggregate.d(678): Assertion failure ---------------- ??:? _d_assertp [0x55672da66de1] ??:? void dmd.aggregate.AggregateDeclaration.makeNested() [0x55672d752f64] ??:? _ZN22DsymbolSemanticVisitor23funcDeclarationSemanticEP15FuncDeclaration [0x55672d7e2c80] ??:? _ZN22DsymbolSemanticVisitor5visitEP15FuncDeclaration [0x55672d7e5d78] ??:? _ZN15FuncDeclaration6acceptEP7Visitor [0x55672d857f61] ??:? _Z15dsymbolSemanticP7DsymbolP5Scope [0x55672d7d9b09] ??:? void dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dclass.ClassDeclaration).__lambda9!(dmd.dsymbol.Dsymbol).__lambda9(dmd.dsymbol.Dsymbol) [0x55672d7ea933] ??:? void dmd.dsymbol.foreachDsymbol(dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*, void delegate(dmd.dsymbol.Dsymbol)) [0x55672d7d3293] ??:? _ZN22DsymbolSemanticVisitor5visitEP16ClassDeclaration [0x55672d7e9e04] ??:? _ZN16ClassDeclaration6acceptEP7Visitor [0x55672d794b85] ??:? _Z15dsymbolSemanticP7DsymbolP5Scope [0x55672d7d9b09] ??:? _ZN25ExpressionSemanticVisitor5visitEP14DeclarationExp [0x55672d837165] ??:? _ZN14DeclarationExp6acceptEP7Visitor [0x55672d81ca21] ??:? _Z18expressionSemanticP10ExpressionP5Scope [0x55672d84d50f] ??:? _ZN24StatementSemanticVisitor5visitEP12ExpStatement [0x55672d8ce49f] ??:? _ZN12ExpStatement6acceptEP7Visitor [0x55672d8caad5] ??:? _Z17statementSemanticP9StatementP5Scope [0x55672d8ce383] ??:? _ZN24StatementSemanticVisitor5visitEP17CompoundStatement [0x55672d8ce766] ??:? _ZN17CompoundStatement6acceptEP7Visitor [0x55672d8cafd1] ??:? _Z17statementSemanticP9StatementP5Scope [0x55672d8ce383] ??:? _ZN16Semantic3Visitor5visitEP15FuncDeclaration [0x55672d8c5206] ??:? _ZN15FuncDeclaration6acceptEP7Visitor [0x55672d857f61] ??:? _Z9semantic3P7DsymbolP5Scope [0x55672d8c3c4d] ??:? _ZN16Semantic3Visitor5visitEP6Module [0x55672d8c404e] ??:? _ZN6Module6acceptEP7Visitor [0x55672d7bb6d9] ??:? _Z9semantic3P7DsymbolP5Scope [0x55672d8c3c4d] ??:? int dmd.mars.tryMain(ulong, const(char)**, ref dmd.globals.Param) [0x55672d7441f8] ??:? _Dmain [0x55672d745e35]
Comment #1
by dlang-bot — 2022-12-15T20:29:54Z
@ibuclaw created dlang/dmd pull request #14702 "fix Issue 23151 - ICE: core.exception.AssertError@src/dmd/aggregate.d(678): Assertion failure" fixing this issue: - fix Issue 23151 - ICE: core.exception.AssertError@src/dmd/aggregate.d(678): Assertion failure
https://github.com/dlang/dmd/pull/14702
Comment #2
by dlang-bot — 2022-12-16T01:05:11Z
dlang/dmd pull request #14702 "fix Issue 23151 - ICE: core.exception.AssertError@src/dmd/aggregate.d(678): Assertion failure" was merged into stable: - 1425fd64bb7a23be0bc479abee67cef295663460 by Iain Buclaw: fix Issue 23151 - ICE: core.exception.AssertError@src/dmd/aggregate.d(678): Assertion failure
https://github.com/dlang/dmd/pull/14702
Comment #3
by dlang-bot — 2023-01-01T06:25:10Z
dlang/dmd pull request #14765 "merge stable" was merged into master: - 53e8b25f2eb267d91b0b0a4dbae5aca8acca06b0 by Iain Buclaw: fix Issue 23151 - ICE: core.exception.AssertError@src/dmd/aggregate.d(678): Assertion failure
https://github.com/dlang/dmd/pull/14765