[Issue 18633] New: Specify clearly if `typectors ref` is the same as `typector auto ref `
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 19 21:46:42 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18633
Issue ID: 18633
Summary: Specify clearly if `typectors ref` is the same as
`typector auto ref `
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
the compiler accepts
`auto ref inout(ElementType!Range) choice(Range, RandomGen = Random)(inout ref
Range range, ref RandomGen urng){...}`
While a more correct form is
`auto ref inout(ElementType!Range) choice(Range, RandomGen = Random)(inout auto
ref Range range, ref RandomGen urng){...}`
The specs don't say why and when `auto` can be omitted, they could be more
accurate.
Problem encountered here:
https://github.com/dlang/phobos/pull/6302#discussion_r175561789
--
More information about the Digitalmars-d-bugs
mailing list