https://d.puremagic.com/issues/show_bug.cgi?id=11915
Summary: Inconsistent overload resolution behaviour between
`ref` and `out`
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Denis Shelomovskij <[email protected]> 2014-01-13
18:51:08 MSK ---
This code illustrates the inconsistency:
---
void f(int) { }
void f(ref int) { }
void g(int) { }
void g(out int) { }
void main()
{
const int n = 1;
f(n); // ok, selects `void f(int)`
g(n); // Error: constant 1 is not an lvalue
}
---
This is either "accepts-invalid" or "rejects-valid" bug.
The issue is segregated from Issue 11857.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------