mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
Fix missing backtick in escape.d error message
This commit is contained in:
parent
ca01894136
commit
8b215f8c16
5 changed files with 13 additions and 13 deletions
|
@ -1010,7 +1010,7 @@ bool checkNewEscape(ref Scope sc, Expression e, bool gag)
|
|||
{
|
||||
const(char)* msg = v.isParameter() ?
|
||||
"escaping a reference to parameter `%s` by copying `%s` into allocated memory" :
|
||||
"escaping a reference to local variable `%s by copying `%s` into allocated memory";
|
||||
"escaping a reference to local variable `%s` by copying `%s` into allocated memory";
|
||||
return setUnsafePreview(&sc, fs, gag, e.loc, msg, v, e);
|
||||
}
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ fail_compilation/retscope2.d(1024): Error: assigning scope variable `p` to non-s
|
|||
fail_compilation/retscope2.d(1107): Error: returning scope variable `dg` is not allowed in a `@safe` function
|
||||
fail_compilation/retscope2.d(1216): Error: returning `s.foo()` escapes a reference to local variable `s`
|
||||
fail_compilation/retscope2.d(1233): Error: returning `t.foo()` escapes a reference to local variable `t`
|
||||
fail_compilation/retscope2.d(1306): Error: escaping a reference to local variable `i by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/retscope2.d(1306): Error: escaping a reference to local variable `i` by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
---
|
||||
*/
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ void bar4()
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/retscope3.d(2008): Error: escaping a reference to local variable `i by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/retscope3.d(2017): Error: escaping a reference to local variable `i by copying `S2000(& i)` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/retscope3.d(2008): Error: escaping a reference to local variable `i` by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/retscope3.d(2017): Error: escaping a reference to local variable `i` by copying `S2000(& i)` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/retscope3.d(4003): Error: escaping a reference to parameter `u` by copying `u[]` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/retscope3.d(4016): Error: storing reference to outer local variable `i` into allocated memory causes it to escape
|
||||
fail_compilation/retscope3.d(4025): Error: escaping reference to stack allocated value returned by `makeSA()` into allocated memory
|
||||
|
|
|
@ -5,7 +5,7 @@ REQUIRED_ARGS: -preview=dip1000
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/retscope6.d(6007): Error: escaping a reference to local variable `i by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/retscope6.d(6007): Error: escaping a reference to local variable `i` by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
---
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/test18282.d(25): Error: returning scope variable `aa` is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(34): Error: escaping a reference to local variable `i by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(35): Error: escaping a reference to local variable `i by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(34): Error: escaping a reference to local variable `i` by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(35): Error: escaping a reference to local variable `i` by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(36): Error: returning scope variable `staa` is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(44): Error: escaping a reference to local variable `i by copying `S2000(& i)` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(53): Error: escaping a reference to local variable `i by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(53): Error: escaping a reference to local variable `c by copying `& c` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(44): Error: escaping a reference to local variable `i` by copying `S2000(& i)` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(53): Error: escaping a reference to local variable `i` by copying `& i` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(53): Error: escaping a reference to local variable `c` by copying `& c` into allocated memory is not allowed in a `@safe` function
|
||||
---
|
||||
*/
|
||||
|
||||
|
@ -57,9 +57,9 @@ void bar3()
|
|||
/******************************
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/test18282.d(1007): Error: escaping a reference to local variable `foo by copying `& foo` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(1008): Error: escaping a reference to local variable `foo by copying `& foo` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(1009): Error: escaping a reference to local variable `foo by copying `& foo` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(1007): Error: escaping a reference to local variable `foo` by copying `& foo` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(1008): Error: escaping a reference to local variable `foo` by copying `& foo` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(1009): Error: escaping a reference to local variable `foo` by copying `& foo` into allocated memory is not allowed in a `@safe` function
|
||||
fail_compilation/test18282.d(1016): Error: escaping a reference to parameter `this` by copying `&this` into allocated memory is not allowed in a `@safe` function
|
||||
---
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue