www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7208] New: Unique arrays should be covariant

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

           Summary: Unique arrays should be covariant
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: timon.gehr gmx.ch


--- Comment #0 from timon.gehr gmx.ch 2012-01-02 22:02:21 PST ---
class A{}
void foo(Object[]){}
A[] bar()pure{return new A[16];}

void main(){
    foo([new A]);   // error                                                    
    foo(new A[16]); // error                                                    
    foo(bar());     // error                                                    
}

The code should compile.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 02 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7208


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg gmx.com


--- Comment #1 from Jonathan M Davis <jmdavisProg gmx.com> 2012-01-02 22:12:49
PST ---
Wouldn't this just reintroduce bug# 2095?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 02 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7208



--- Comment #2 from timon.gehr gmx.ch 2012-01-02 22:14:18 PST ---
No. There is no issue if the array is provable unique.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 02 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7208



--- Comment #3 from timon.gehr gmx.ch 2012-01-19 02:02:05 PST ---
foo([new A]) seems to work now with DMD 2.057.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 19 2012