Bug 6647 – [SafeD] unhelpful error message for @safety mismatch of generated destructor

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-09-11T10:23:00Z
Last change time
2012-10-27T02:26:49Z
Keywords
pull
Assigned to
nobody
Creator
dmitry.olsh

Comments

Comment #0 by dmitry.olsh — 2011-09-11T10:23:28Z
Test case: struct A { ~this(){} } @safe struct B { A a; } @safe void f() { auto x = B.init; } dmd outputs: Error: safe function '~this' cannot call system function '~this' And no line number or type anywhere in message. At very minimum it should state which type is used in first ~this and which in second.
Comment #1 by yebblies — 2012-10-27T02:25:46Z