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 }
https://github.com/D-Programming-Language/dmd/pull/800