Fix Issue 9433 - Deprecate delete#1941
Fix Issue 9433 - Deprecate delete#1941wilzbach merged 1 commit intodlang:masterfrom JinShil:deprecate_delete
Conversation
|
Even though |
|
This is ready for additional scrutiny and potential merge, now that dlang/druntime#2037 is in. |
|
FYI: When I deprecated the hex strings, I removed them from the spec immediately (#2118), which led to an outcry on the forums. |
OK. all the documentation about |
wilzbach
left a comment
There was a problem hiding this comment.
There's REF1_ALTTEST too 🏋️♂️
spec/class.dd
Outdated
| $(P The program can explicitly inform the garbage collector that an | ||
| object is no longer referred to (with the delete expression), and | ||
| object is no longer referred to | ||
| (with $(LINK2 phobos/object.html#.destroy, $(D object.destroy()))), and |
There was a problem hiding this comment.
`$(REF1 destroy, object)
or if you like the parenthesis sth. like
spec/class.dd
Outdated
| This rule does not apply to auto objects or objects deleted | ||
| with the $(I DeleteExpression), as the destructor is not being run | ||
| This rule does not apply to auto objects or objects destructed | ||
| with $(LINK2 phobos/object.html#.destroy, $(D object.destroy())), |
spec/expression.dd
Outdated
| $(D delete) $(GLINK UnaryExpression) | ||
| ) | ||
| $(P NOTE: `delete` has been deprecated. Instead, please use $(REF1 destroy, object) | ||
| if feasible, or $(REF __delete, core, memory) as a last resort) |
|
Anyone know what's causing this error in DAutoTest? |
| $(P The program can explicitly inform the garbage collector that an | ||
| object is no longer referred to with $(REF1 destroy, object), and | ||
| then the garbage collector calls the destructor immediately. The | ||
| destructor is guaranteed to never be called twice. |
There was a problem hiding this comment.
The parens is there on the next line: 639.
Yeah, it's the universally beloved DDoc system - it throws no error on trailing parenthesis, but LaTeX will. |
|
Ah that's the real issue: Fix: #2194 |
|
Thanks to @wilzbach this is now passing and is ready for additional scrutiny, and potentially a merge. |
|
Ping. The DMD PR has been merged, and this really needs to go in along with it for the next release. |
|
@andralex or whoever can act on this. This needs to go in with the other, already merged, PRs. |
wilzbach
left a comment
There was a problem hiding this comment.
I typically don't merge spec PRs until @andralex or @WalterBright have given their approval, but as @JinShil pointed out this sat too long in the queue. We need to be able to move faster.
|
Cool, thanks. |
Spec and documentation update to accompany dlang/dmd#7342