[Issue 13783] New: Function overload with rvalue `inout` parameter not selected when `enum` parameter implicitly converted to its base type
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Nov 27 03:53:24 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13783
Issue ID: 13783
Summary: Function overload with rvalue `inout` parameter not
selected when `enum` parameter implicitly converted to
its base type
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: verylonglogin.reg at gmail.com
This code should work fine:
---
enum E { a }
inout(int) f(inout(int) t) { return t; }
ref inout(int) f(ref inout(int) t) { return t; }
void main()
{
const E e;
f(e); // line 9
}
---
main.d(9): Error: constant 0 is not an lvalue
---
May be related to Issue 12068.
--
More information about the Digitalmars-d-bugs
mailing list