Bug 7794 – Sea of errors when calling regex() after compile error

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-29T09:17:00Z
Last change time
2012-03-29T15:17:09Z
Keywords
diagnostic
Assigned to
nobody
Creator
kekeniro2

Comments

Comment #0 by kekeniro2 — 2012-03-29T09:17:42Z
I am working on D2059 head. Building the following code, I get 60+ lines of error message. D2058 outputs only one error. --------------------------------------- import std.regex; void main() { 0; // to cause the _first_ compile error regex("a"); } --------------------------------------- I believe that it relates to the issue 7557.
Comment #1 by kekeniro2 — 2012-03-29T09:25:41Z
Reduced code is here. ( I wanted to reduce more but couldn't ) --------------------------------------------- // from std.typetuple template TypeTuple(T...) { alias T TypeTuple; } template staticMap( T...) { static if (T.length == 0) { alias TypeTuple!() staticMap; } else { alias TypeTuple!( staticMap!( T[1 .. $] ) ) staticMap; } } // from std.typecons struct Tuple(U) { template FieldSpec() { } template parseSpecs(T...) { static if (T.length == 0) { alias TypeTuple!() parseSpecs; } else { alias TypeTuple!( FieldSpec!(), parseSpecs!( T[1 .. $] ) ) parseSpecs; } } alias staticMap!( parseSpecs!U ) Types; } // instantiating void main() { 0; // to cause the _first_ error Tuple!int a; }
Comment #2 by clugdbug — 2012-03-29T12:41:59Z
Comment #3 by github-bugzilla — 2012-03-29T13:35:32Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2707f8a7f2451a83f40b3644be2a09a8a5649d93 Merge pull request #849 from donc/bug7794 Fix issue 7794 Sea of errors when calling regex() after compile error