Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dmd/parse.d
Original file line number Diff line number Diff line change
Expand Up @@ -7756,7 +7756,7 @@ final class Parser(AST) : Lexer
// 1. Deprecation for 1 year
// 2. Error for 1 year
// 3. Removal, "delete" can be used for other identities
deprecation("The `delete` keyword has been deprecated. Use `object.destroy()` instead.");
deprecation("The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.");
e = new AST.DeleteExp(loc, e, false);
break;

Expand Down
6 changes: 3 additions & 3 deletions test/compilable/vgc1.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
/*
TEST_OUTPUT:
---
compilable/vgc1.d(93): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
compilable/vgc1.d(94): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
compilable/vgc1.d(95): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
compilable/vgc1.d(93): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
compilable/vgc1.d(94): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
compilable/vgc1.d(95): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
---
*/

Expand Down
60 changes: 30 additions & 30 deletions test/fail_compilation/fail14486.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail14486.d(81): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(82): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(83): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(84): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(85): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(99): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(100): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(101): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(102): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(103): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(123): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(124): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(125): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(126): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(127): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(141): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(142): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(143): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(144): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(145): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(164): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(165): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(166): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(167): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(168): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(181): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(182): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(183): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(184): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(185): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail14486.d(81): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(82): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(83): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(84): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(85): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(99): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(100): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(101): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(102): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(103): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(123): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(124): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(125): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(126): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(127): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(141): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(142): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(143): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(144): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(145): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(164): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(165): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(166): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(167): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(168): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(181): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(182): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(183): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(184): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail14486.d(185): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
---
*/

Expand Down
2 changes: 1 addition & 1 deletion test/fail_compilation/fail2361.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail2361.d(14): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail2361.d(14): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail2361.d(14): Error: cannot modify `immutable` expression `c`
---
*/
Expand Down
2 changes: 1 addition & 1 deletion test/fail_compilation/fail_arrayop2.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail_arrayop2.d(281): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/fail_arrayop2.d(281): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/fail_arrayop2.d(13): Error: array operation `[1, 2, 3] - [1, 2, 3]` without destination memory not allowed
fail_compilation/fail_arrayop2.d(16): Error: invalid array operation `"a" - "b"` (possible missing [])
---
Expand Down
2 changes: 1 addition & 1 deletion test/fail_compilation/faildeleteaa.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/faildeleteaa.d(12): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/faildeleteaa.d(12): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/faildeleteaa.d(12): Error: cannot delete type `int`
---
*/
Expand Down
6 changes: 3 additions & 3 deletions test/fail_compilation/nogc1.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
/*
TEST_OUTPUT:
---
fail_compilation/nogc1.d(91): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/nogc1.d(92): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/nogc1.d(93): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/nogc1.d(91): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/nogc1.d(92): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/nogc1.d(93): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
---
*/

Expand Down
2 changes: 1 addition & 1 deletion test/fail_compilation/test16195.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* TEST_OUTPUT:
---
fail_compilation/test16195.d(14): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` instead.
fail_compilation/test16195.d(14): Deprecation: The `delete` keyword has been deprecated. Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
fail_compilation/test16195.d(14): Error: `delete p` is not `@safe` but is used in `@safe` function `test`
---
*/
Expand Down