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: [email protected]
Reporter: [email protected]
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.
--