www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 1568] New: Core dump when I invoke a template member function

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1568

           Summary: Core dump when I invoke a template member function
           Product: DGCC aka GDC
           Version: 0.24
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: pop.atry gmail.com


void invoke(alias x, int n)() {
  x!(n)();
}

struct foo {
  char c;
  void bar(int n)() {
    assert(n == 123);
    assert(c == 'c');
  }
}

unittest {
  auto f = foo('c');
  assert(f.c == 'c');
  invoke!(f.bar, 123)();
  assert(f.c == 'c');
}


-- 
Oct 10 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1568


dvdfrdmn users.sf.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           Keywords|                            |ice-on-invalid-code
         Resolution|                            |FIXED





Fixed in svn rev 182 / release 0.25.  Note that this is invalid code and
compiler should be reporting an error.


-- 
Oct 13 2007