[Issue 17635] [REG 2.066.0] cannot convert unique immutable(int)** to immutable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 7 09:31:49 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17635
ag0aep6g at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #9 from ag0aep6g at gmail.com ---
The original test case has been fixed, but it can be made to fail again by
changing the parameter type slightly. As far as I can tell, the parameter type
shouldn't matter, as long as it's not mutable.
----
alias T = immutable int;
T** f(I)(const I input) pure
{
T** output;
return output;
}
void main()
{
/* Not regressions in 2.066 (i.e. 2.065 also rejected these): */
T*** a1;
immutable T** r1 = f(a1);
static struct S2 { T* foo; }
S2* a2;
immutable T** r2 = f(a2);
/* But this one compiles with 2.065, so it's another regression: */
static struct S3 { T foo; }
S3* a3;
immutable T** r3 = f(a3);
}
----
Tested with DMD64 D Compiler v2.076.1-b1-166-g2f98e66e5.
Reopening. Let me know if I should file a new issue (or multiple ones) instead.
--
More information about the Digitalmars-d-bugs
mailing list