[Issue 10420] New: Incorrect function attributes in `core.exception`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 20 01:11:20 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10420
Summary: Incorrect function attributes in `core.exception`
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: druntime
AssignedTo: verylonglogin.reg at gmail.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-06-20 12:11:19 MSD ---
---
import core.exception;
void f1(int i) nothrow // OK
{ assert(i); }
void f2(int i) nothrow // OK
{ if(!i) throw new AssertError(__FILE__, __LINE__); }
void f3(int i) nothrow // error, should be OK
{ if(!i) onAssertError(); }
void main()
{
// accepted, should be rejected:
setAssertHandler((file, line, msg) { throw new Exception(""); });
f1(0); // nothrow function will throw an `Exception`
}
---
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list