https://issues.dlang.org/show_bug.cgi?id=21806
Issue ID: 21806
Summary: Overload selection ignores slice
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Consider:
void main()
{
ubyte[16] arr;
pragma(msg, typeof(arr[]));
pragma(msg, typeof(arr[].bar));
arr[].bar.writeln; // 123
}
char bar()(in ubyte[] arr)
{
return 'X';
}
int bar(size_t N)(in ubyte[N] arr)
{
return 123;
}
Compilation output:
ubyte[]
int
Should be:
ubyte[]
char
--