Bug 7671 – Broken inout deduction of shared(inout(T[n])) from immutable(int[3])

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-08T05:44:00Z
Last change time
2012-03-11T15:15:43Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-03-08T05:44:46Z
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 }
Comment #1 by k.hara.pg — 2012-03-11T06:59:12Z