[Issue 1511] Expression T[] + T[] passes as having a type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 21 13:20:18 PDT 2007


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


smjg at iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg at iname.com
           Keywords|                            |accepts-invalid
            Summary|static assert doesn't fail  |Expression T[] + T[] passes
                   |as expected                 |as having a type




------- Comment #7 from smjg at iname.com  2007-10-21 15:20 -------
(In reply to comment #4)
>> what is (char[] + char[]) ?
> 
> char[].
> In theory, that's an array operation of addition of chars, but that's
> not implemented yet.

It isn't not implemented yet, it's not in the language.  So the static assert
should definitely fail.

Even if it were "not implemented" as part of the compiler being under
construction, I wouldn't call this behaviour correct.

The bug also bites for other array types, as long as they're both the same.


-- 



More information about the Digitalmars-d-bugs mailing list