[Issue 14844] New: dmd-2.068.0-b2 attrib.c:1233: virtual Dsymbols* StaticIfDeclaration::include(Scope*, ScopeDsymbol*): Assertion `scopesym' failed
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jul 28 09:56:23 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14844
Issue ID: 14844
Summary: dmd-2.068.0-b2 attrib.c:1233: virtual Dsymbols*
StaticIfDeclaration::include(Scope*, ScopeDsymbol*):
Assertion `scopesym' failed
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: wikodes at gmail.com
Compiler: dmd-2.068.beta2
Reduced code with dustmite. It isn't valid D code any more but reproduces the
compiler bug that occurred when compiling the complete source.
Compiler message:
dmd: attrib.c:1233: virtual Dsymbols* StaticIfDeclaration::include(Scope*,
ScopeDsymbol*): Assertion `scopesym' failed.
Code:
module app;
import std.string;
import std.typecons;
static this() {
runUnitTests!app;
}
alias CppNs = Typedef!string;
bool runUnitTests(COMPOSITES...)() {
g_runner.runUnitTests!COMPOSITES;
}
class TestRunner {
bool runUnitTests(COMPOSITES...)() {
foreach (comp; COMPOSITES)
if (runUnitTestsImpl!comp)
ret;
}
bool runUnitTestsImpl(COMPOSITE...)() {
bool ret;
foreach (M; __traits(allMembers, COMPOSITE))
static if (__traits(compiles, __traits(getMember, COMPOSITE, M))
&& !isModule!(__traits(getMember, COMPOSITE, M)))
if (runUnitTestsImpl!(__traits(getMember, COMPOSITE, M)))
ret = false;
return ret;
}
}
TestRunner g_runner;
template isModule(DECL...) {
enum isModule = DECL[0].stringof.startsWith("module ");
}
--
More information about the Digitalmars-d-bugs
mailing list