Bug 11868 – ICE(template.c) on passing `inout const` argument as TemplateTupleParameter
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-05T01:25:00Z
Last change time
2014-01-06T01:58:20Z
Keywords
ice, pull
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0 by verylonglogin.reg — 2014-01-05T01:25:45Z
This code should compile:
---
void f(A...)(A) { }
void g(inout(int)[] arr)
{
foreach(ref e; arr)
f(e);
}
---
Assertion failure: '0' on line 1503 in file 'template.c'
---
It worked with previous dmd. As a result dmd ICEs now on such previously working code:
---
import std.algorithm;
void f(inout(int)[] arr)
{ arr.all!(a => true)(); }
---