[Issue 12646] New: Catching Errors should imply nothrow
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Apr 25 06:11:42 PDT 2014
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: nobody at puremagic.com
Reporter: andrej.mitrovich at gmail.com
-----
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() { }
-----
--
More information about the Digitalmars-d-bugs
mailing list