On 05/08/2014 09:01 AM, Jonathan M Davis via Digitalmars-d wrote:
It really has nothing to do with passing an argument to a function
beyond the fact that that triggers an implicit call to the slice operator.

module check_claim;
import std.stdio;

auto foo(immutable(int)[] a){writeln("Indeed, this is what happens.");}
auto foo(immutable(int[]) a){writeln("No, this is not what happens.");}

void main(){
    immutable(int[]) x;
    foo(x);
}

$ dmd -run check_claim
No, this is not what happens.

Reply via email to