https://issues.dlang.org/show_bug.cgi?id=12646
Issue ID: 12646
Summary: Catching Errors should imply nothrow
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
-----
void func() { }
// ok
void test1() nothrow
{
try
{
func();
}
catch (Exception th)
{
}
}
// Error: function 'test.test2' is nothrow yet may throw
void test2() nothrow
{
try
{
func();
}
catch (Error th)
{
}
}
void main() { }
-----
--