[Issue 9899] New: struct with pure/nothrow destructor cannot be used as a struct member in pure/nothrow functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 7 10:31:37 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9899
Summary: struct with pure/nothrow destructor cannot be used as
a struct member in pure/nothrow functions
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: henning at still-hidden.de
--- Comment #0 from Henning Pohl <henning at still-hidden.de> 2013-04-07 10:31:36 PDT ---
struct S {
nothrow pure ~this() {
}
}
struct MemberS {
S s;
}
void main() nothrow pure { // 10
MemberS s; // 11
}
-----
main.d(11): Error: pure function 'D main' cannot call impure function
'main.MemberS.~this'
main.d(11): Error: s.~this is not nothrow
main.d(10): Error: function D main 'main' is nothrow yet may throw
-----
Note: When the destructor is removed, everything works just fine.
--
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