https://issues.dlang.org/show_bug.cgi?id=12649
Issue ID: 12649
Summary: "discards return value" warning will cause ICE on
function pointer call
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: ice
Severity: regression
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
Test case:
int foo() pure nothrow { return 1; }
void main()
{
auto fp = &foo;
//foo(); // Warning: Call to function test.foo without side effects
// discards return value
fp(); // ICE!
}
--