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.
Comment #1 by k.hara.pg — 2014-10-26T04:01:26Z
Comment #2 by github-bugzilla — 2014-10-26T08:51:30Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/868bc03002c5eca0a615c141f7dcfeccf0a7ab17 fix Issue 11916 - [IFTI] Disabled by constraint overload with `out` with IFTI breaks overload resolution https://github.com/D-Programming-Language/dmd/commit/c6289aaaed66f86de0950954c953f45b0f4f342d Merge pull request #4091 from 9rnsr/fix12447 Issue 12447 & 11915 & 11916 - fix overload resolution issue around IFTI and out parameter
Comment #3 by github-bugzilla — 2015-02-18T03:38:50Z
Commits pushed to 2.067 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/868bc03002c5eca0a615c141f7dcfeccf0a7ab17 fix Issue 11916 - [IFTI] Disabled by constraint overload with `out` with IFTI breaks overload resolution https://github.com/D-Programming-Language/dmd/commit/c6289aaaed66f86de0950954c953f45b0f4f342d Merge pull request #4091 from 9rnsr/fix12447