[Issue 22108] New: DIP1000 parameter mistakenly interpreted as return scope instead of scope
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 7 01:34:27 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22108
Issue ID: 22108
Summary: DIP1000 parameter mistakenly interpreted as return
scope instead of scope
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
This should fail to compile with dip1000:
ref int test(ref scope return int* p)
{
return *p;
}
p should be 'return ref` and `scope`, but the compiler interprets it as `ref`
and `return scope` and passes it.
--
More information about the Digitalmars-d-bugs
mailing list