www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 857] New: Error: no size for type void() doesn't show the line number

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

           Summary: Error: no size for type void() doesn't show the line
                    number
           Product: D
           Version: 1.00
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: deewiant gmail.com


void main() {
        void function()[] x;
        x = &main ~ x;
}

The above invalid code causes the error "Error: no size for type void()". The
error on which the line occurs is not reported.


-- 
Jan 19 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=857






related:

http://dstress.kuehne.cn/nocompile/v/void_02_A.d
http://dstress.kuehne.cn/nocompile/v/void_02_B.d
http://dstress.kuehne.cn/nocompile/v/void_02_D.d


-- 
Jan 21 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=857


deewiant gmail.com changed:

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





Works in 1.009 - the code compiles. Looking at it now, I'm not sure why I
called it invalid. It was probably the fact that code like the following is
valid, which I didn't know until now:

int[] x;
x = 1 ~ x; // concatenating to an int, which is kind of weird


-- 
Mar 23 2007