Bug 11916 – [IFTI] Disabled by constraint overload with `out` with IFTI breaks overload resolution
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-13T06:56:00Z
Last change time
2015-02-18T03:38:50Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0 by verylonglogin.reg — 2014-01-13T06:56:58Z
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.