Thread overview
[Issue 651] New: Assertion failure: 'global.errors' on line 2622 in file 'template.c'
Dec 05, 2006
d-bugmail
Dec 10, 2006
Thomas Kuehne
Dec 27, 2006
d-bugmail
December 05, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=651

           Summary: Assertion failure: 'global.errors' on line 2622 in file
                    'template.c'
           Product: D
           Version: 0.176
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: kinaba@is.s.u-tokyo.ac.jp


The following program, forwarding an alias tuple to another template, casues abnormal compiler termination:

  // discovered by shinichiro.h
  void f() {}
  template foo(T) {}
  template bar(T...){ alias foo!(T) buz; }
  alias bar!(f) a;

which prints:

  Assertion failure: 'global.errors' on line 2622 in file 'template.c'

  abnormal program termination

Here's my experiment of replacing "void f() {}" to other statements:
 - import f : same assertion failure
 - class f {} : ok
 - int f : ok
 - const f = 1 : ok
So it is a problem of alias tuples?


-- 

December 10, 2006
d-bugmail@puremagic.com schrieb am 2006-12-05:
> http://d.puremagic.com/issues/show_bug.cgi?id=651

> The following program, forwarding an alias tuple to another template, casues abnormal compiler termination:
>
>   // discovered by shinichiro.h
>   void f() {}
>   template foo(T) {}
>   template bar(T...){ alias foo!(T) buz; }
>   alias bar!(f) a;
>
> which prints:
>
>   Assertion failure: 'global.errors' on line 2622 in file 'template.c'
>
>   abnormal program termination
>
> Here's my experiment of replacing "void f() {}" to other statements:
>  - import f : same assertion failure
>  - class f {} : ok
>  - int f : ok
>  - const f = 1 : ok
> So it is a problem of alias tuples?

Added to DStress as http://dstress.kuehne.cn/nocompile/b/bug_template_2622_A.d http://dstress.kuehne.cn/nocompile/b/bug_template_2622_B.d

Thomas


December 27, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=651


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #2 from bugzilla@digitalmars.com  2006-12-27 02:00 -------
Fixed DMD 0.178


--