[Issue 9070] New: nothrow of constructer/destructor isn't correct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 24 04:19:28 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9070
Summary: nothrow of constructer/destructor isn't correct
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: zan77137 at nifty.com
--- Comment #0 from SHOO <zan77137 at nifty.com> 2012-11-24 04:19:27 PST ---
This code doesn't work:
struct A(T)
{
this(U)(U x) { }
~this(){}
}
void main()
{
A!int a = A!short();
}
--------
Result:
main.d(4): Error: x.~this is not nothrow
main.d(4): Error: constructor main.A!(int).A.__ctor!(short).this 'this' is
nothrow yet may throw
main.d(9): Error: template instance main.A!(int).A.__ctor!(short) error
instantiating
--
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