www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7671] New: Broken inout deduction of shared(inout(T[n])) from immutable(int[3])

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

           Summary: Broken inout deduction of shared(inout(T[n])) from
                    immutable(int[3])
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com



inout(int)[3]  idn1             ( inout(int)[3] );
       inout( U )[n]  idx1(U, size_t n)( inout( U )[n] );

shared(inout int)[3]  idn2             ( shared(inout int)[3] );
shared(inout  U )[n]  idx2(U, size_t n)( shared(inout  U )[n] );

void main()
{
    pragma(msg, typeof( idn1( (immutable(int)[3]).init ) ));    //
immutable(int[3]), OK
    pragma(msg, typeof( idx1( (immutable(int)[3]).init ) ));    //
immutable(int[3]), OK

    pragma(msg, typeof( idn2( (immutable(int)[3]).init ) ));    //
immutable(int[3]), OK
    pragma(msg, typeof( idx2( (immutable(int)[3]).init ) ));    // Error!
    // test.d(13): Error: template test.idx2(U,uint n) does not match any
function template declaration
}

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


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid



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

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


Walter Bright <bugzilla digitalmars.com> changed:

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


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