[Issue 7794] Sea of errors when calling regex() after compile error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 29 09:25:13 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7794


kekeniro2 at yahoo.co.jp changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic


--- Comment #1 from kekeniro2 at yahoo.co.jp 2012-03-29 09:25:41 PDT ---
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;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list