www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3069] New: Result of concatenation of static arrays does not implicitly cast to void[]

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

           Summary: Result of concatenation of static arrays does not
                    implicitly cast to void[]
           Product: D
           Version: 1.045
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: minor
          Priority: P3
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com


=== Testcase ===
void main()
{
    ubyte id;
    void[] v = [id] ~ [id];
}
=== Compiler output ===
test.d(4): Error: cannot implicitly convert expression ([id,id]) of type
ubyte[] to void[]
=== Testcase end ===
Adding [] after either [id] allows the code to compile.

This is probably related to #3068, if it isn't actually the same bug...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 15 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3069


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
           Priority|P3                          |P2
                 CC|                            |yebblies gmail.com
            Version|1.045                       |D1 & D2
            Summary|Result of concatenation of  |Issue 3069 - Array literals
                   |static arrays does not      |do not implicitly cast to
                   |implicitly cast to void[]   |void[]
           Severity|minor                       |normal


--- Comment #1 from yebblies <yebblies gmail.com> 2011-09-07 19:17:14 EST ---
Nothing to do with concatenation, array literals don't convert to void[].

void main()
{
    ubyte id;
    void[] v = [id];
}


https://github.com/D-Programming-Language/dmd/pull/371

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 07 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3069


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2011-09-10
20:20:59 PDT ---
https://github.com/D-Programming-Language/dmd/commit/fe4e4ec6c50664f484e883337a8ab3614a704f6d

https://github.com/D-Programming-Language/dmd/commit/554f3c781222b442afa4196288d62dcef4163add

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 10 2011