Bug 7340 – inout not resolved for default parameters

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-21T15:17:05Z
Last change time
2024-12-13T17:57:56Z
Assigned to
No Owner
Creator
timon.gehr
Moved to GitHub: dmd#18403 →

Comments

Comment #0 by timon.gehr — 2012-01-21T15:17:05Z
DMD 2.057: inout(Object) bar(inout(Object) y = null){return y;} static assert(is(typeof(bar())==typeof(bar(null)))); Error: static assert (is(inout(Object) == Object)) is false the code should compile.
Comment #1 by maximzms — 2016-03-28T14:11:41Z
DMD 2.070.2 -------------------- inout(int) bar(inout(int) y = 0){return y;} pragma(msg, typeof(bar())); pragma(msg, typeof(bar(0))); -------------------- Output: -------------------- inout(int) int -------------------- `inout` qualifier somehow escapes the context of `bar` function.
Comment #2 by robert.schadek — 2024-12-13T17:57:56Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18403 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB