← Back to index
|
Original Bugzilla link
Bug 11358 – debug import and getUnittests do not mix
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-25T15:58:00Z
Last change time
2013-10-26T11:09:39Z
Keywords
ice, pull
Assigned to
nobody
Creator
dbdavidson
Comments
Comment #0
by dbdavidson — 2013-10-25T15:58:41Z
The following code will segfault when run with: dmd -main -unittest c.d However it runs fine with dmd -main -unittest -debug c.d import std.typetuple; import std.stdio; debug import std.datetime; unittest { writeln("In Test!!"); } mixin("alias mod = " ~ __MODULE__ ~ ";"); alias tests = TypeTuple!(__traits(getUnitTests, mod)); static this() { writeln("Done"); }
Comment #1
by k.hara.pg — 2013-10-26T06:36:48Z
Reduced test case: debug { } enum len = __traits(getUnitTests, mixin(__MODULE__)).length; Compiler fix:
https://github.com/D-Programming-Language/dmd/pull/2695
Comment #2
by github-bugzilla — 2013-10-26T11:09:31Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/3bee007ab0a68fd36d397a004a1a43af9d0b550c
fix Issue 11358 - debug import and getUnittests do not mix
https://github.com/D-Programming-Language/dmd/commit/ece5793e34711f217cac02b19b5f5479a1320c9f
Merge pull request #2695 from 9rnsr/fix11358 Issue 11358 - debug import and getUnittests do not mix