[Issue 11916] New: [IFTI] Disabled by constraint overload with `out` with IFTI breaks overload resolution
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 13 06:56:59 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11916
Summary: [IFTI] Disabled by constraint overload with `out` with
IFTI breaks overload resolution
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2014-01-13 18:56:58 MSK ---
This code should compile:
---
void f(T)(T) { }
void f(T)(out T) if(false) { } // line 2
void main()
{
const int n = 1;
f(n); // no errors for `f!int(n)`
}
---
main.d(2): Error: cannot have const out parameter of type const(int)
---
The bug is major as there is no line number for the call.
Also note the code will work with `ref` instead of `out` because of Issue
11915.
The issue is segregated from Issue 11857.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list