Skip to content

Commit 83a4d84

Browse files
committed
Change error to deprecation
1 parent 16982cd commit 83a4d84

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/dmd/escape.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,8 +1284,8 @@ private bool checkReturnEscapeImpl(Scope* sc, Expression e, bool refs, bool gag)
12841284
* Hence, the annotation needs to be explicit.
12851285
*/
12861286
if (!gag)
1287-
error(e.loc, "`pure` function `%s` returns parameter `%s`, annotate with `return`",
1288-
sc.func.ident.toChars(), v.toChars());
1287+
deprecation(e.loc, "`pure` function `%s` returns parameter `%s`, annotate with `return`",
1288+
sc.func.ident.toChars(), v.toChars());
12891289
result = true;
12901290
}
12911291
else

0 commit comments

Comments
 (0)