Bug 13127 – Cannot deduce function with int[][] argument and "in" parameter

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-13T19:53:00Z
Last change time
2014-08-22T08:04:33Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
doob

Comments

Comment #0 by doob — 2014-07-13T19:53:10Z
This code works in DMD 2.065.0 but not in 2.066.0-b3: void foo (T)(in T[] src, T[] dest); void main () { int[][] a; foo(a, a); } The error message is: main.d(14): Error: template main.foo cannot deduce function from argument types !()(int[][], int[][]), candidates are: main.d(9): main.foo(T)(in T[] src, T[] dest) If I remove "in" or if "a" is of type "int[]" it compiles.
Comment #1 by k.hara.pg — 2014-07-14T15:45:42Z
Comment #2 by k.hara.pg — 2014-07-14T15:52:43Z
Comment #3 by github-bugzilla — 2014-07-16T01:46:56Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/37394d0a44e72ee76c03cbc03b569af4c037d47c fix Issue 13127 - Cannot deduce function with int[][] argument and "in" parameter https://github.com/D-Programming-Language/dmd/commit/1b128e85fe8f8879237dd11c53a865de12f739dc Merge pull request #3763 from 9rnsr/fix13127 [REG2.066a] Issue 13127 - Cannot deduce function with int[][] argument and "in" parameter
Comment #4 by github-bugzilla — 2014-07-16T03:52:27Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/32c6023151021798cce0c33f447ed6b2c11cae50 Merge pull request #3763 from 9rnsr/fix13127 [REG2.066a] Issue 13127 - Cannot deduce function with int[][] argument and "in" parameter
Comment #5 by github-bugzilla — 2014-08-22T08:04:33Z