Bug 18445 – [DIP25][DIP1000] Wrong "return as a parameter attribute" inference
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-02-15T11:19:31Z
Last change time
2018-03-19T10:48:37Z
Keywords
rejects-valid, safe, spec
Assigned to
No Owner
Creator
Carsten Blüggel
Comments
Comment #0 by chilli — 2018-02-15T11:19:31Z
Example from phobos (-dip1000, DMD64 D Compiler v2.078.2+/master):
https://github.com/dlang/phobos/blob/master/std/container/slist.d
make -f posix.mak std/container/slist.test (-dip1000 switch for that module)
std/container/slist.d(378) [referring to struct SList(T). size_t insertFront(Stuff)(Stuff stuff)]: Error: parameter stuff is return but function does not return any indirections
No error, when -dip25 switch is thrown instead.
Comment #1 by chilli — 2018-03-19T10:46:08Z
(In reply to Carsten Blüggel from comment #0)
> Example from phobos (-dip1000, DMD64 D Compiler v2.078.2+/master):
> https://github.com/dlang/phobos/blob/master/std/container/slist.d
>
> make -f posix.mak std/container/slist.test (-dip1000 switch for that module)
>
> std/container/slist.d(378) [referring to struct SList(T). size_t
> insertFront(Stuff)(Stuff stuff)]: Error: parameter stuff is return but
> function does not return any indirections
>
> No error, when -dip25 switch is thrown instead.
Fixing slist.d to be -dip1000 compilable doesn't depend on this issue any more