www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 434] New: Compiler crash on template function syntax error

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

           Summary: Compiler crash on template function syntax error
           Product: D
           Version: 0.169
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: aarti interia.pl


class FObject {
public:
    char[] opCall()(char[] s) {return s; }
}
void main() { 
auto f=new FObject;
char[] delegate(char[]) d=&f.opCall;
}

while declaration of opCall is probably not proper - (is it template with no
type argument?), it shouldn't break compiler.


-- 
Oct 15 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=434





------- Comment #1 from braddr puremagic.com  2006-10-16 03:33 -------
This bug was introduced between dmd 168 and 169.  Prior to 169 dmd errored out
with:

434.d(7): opCall() is not an lvalue
434.d(7): cannot take address of opCall()
434.d(7): cannot implicitly convert expression (&(opCall())) of type int to
char[] delegate(char[])

$ cat -n 434.d | grep 7
     7      char[] delegate(char[]) d=&f.opCall;


-- 
Oct 16 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=434





------- Comment #2 from braddr puremagic.com  2006-10-16 04:54 -------
This is almost certainly a dup of bug 410


-- 
Oct 16 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=434


bugzilla digitalmars.com changed:

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




------- Comment #3 from bugzilla digitalmars.com  2006-10-25 20:01 -------
works in DMD 0.172


-- 
Oct 25 2006