https://issues.dlang.org/show_bug.cgi?id=20032
Issue ID: 20032
Summary: ImmutableOf!char[] The result is incorrect.
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
When the template parameter is char:
alias A = char[];
alias ImmuTypeA = ImmutableOf!A;
pragma(msg, ImmuTypeA); // -> immutable(string), Should be:
immutable(char[])
alias B = immutable (char) [];
alias ImmuTypeB = ImmutableOf!B;
pragma(msg, ImmuTypeB); // -> immutable(string), OK!
This incorrect does not exist when the template parameter is int:
alias A = int[];
alias ImmuTypeA = ImmutableOf!A;
pragma(msg, ImmuTypeA); // -> immutable(int[]), OK!
alias B = immutable (int) [];
alias ImmuTypeB = ImmutableOf!B;
pragma(msg, ImmuTypeB); // -> immutable(int[]), OK!
--