[Issue 3020] New: No description is given why function may not be nothrow
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat May 23 03:08:30 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3020
Summary: No description is given why function may not be
nothrow
Product: D
Version: unspecified
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: critical
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: 2korden at gmail.com
import std.stdio;
int foo(int i, int j) nothrow
{
return i + j;
}
int bar() nothrow
{
return 0;
}
void test() nothrow
{
int x = bar();
int y = foo(x, x);
writefln("%d, %d", x, y);
}
void main()
{
test();
}
Expected output:
test.d(13): Error: function test.test 'test' is nothrow yet writefln at
test.d(17) may throw
Actual output:
test.d(13): Error: function test.test 'test' is nothrow yet may throw
Rising its severity because the feature is barely usable without appropriate
error messages.
--
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