https://d.puremagic.com/issues/show_bug.cgi?id=11822
Summary: `-de` switch causees ICE with `auto` return and other
stuff
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: ice
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-12-26
16:19:22 MSK ---
This code should be rejected to compile with `-de` switch:
---
struct S(alias pred)
{
this(int) { pred(1); }
void f() { pred(1); }
}
auto g(alias pred)()
{ return S!pred(1); }
deprecated bool d(int)
{ return true; }
auto h()
{
int i;
return g!(n => d(i))();
}
---
main.d(16): Deprecation: function main.d is deprecated
main.d(8): instantiated from here: S!(__lambda1)
main.d(16): instantiated from here: g!((n) => d(i))
main.d(16): Error: template instance main.h.g!((n) => d(i)) error instantiating
Assertion failure: 'type->ty == Tfunction' on line 3178 in file 'func.c'
---
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------