[Issue 21290] New: [REG2.092] Incorrect escape deprecation on scope lazy pointer parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 4 16:05:25 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21290
Issue ID: 21290
Summary: [REG2.092] Incorrect escape deprecation on scope lazy
pointer parameter
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: johanengelen at weka.io
Test code:
```
void foo(scope lazy void* p);
struct S {
this(int a) {
foo(&this); // line 5
}
}
```
When compiled with dlang >= 2.092, the following deprecation message is shown:
<source>(5): Deprecation: escaping reference to outer local variable `this`
The deprecation message is incorrect because of `scope` in the function
parameter signature.
The code compiles without deprecation message when `lazy` is removed.
(This is probably because DIP25 violations now show deprecation messages, i.e.
DIP25 implementation bugs now start to surface. Deprecation message bugs are as
bad as error bugs, because -de is used in settings where one does not want to
disable it.)
--
More information about the Digitalmars-d-bugs
mailing list