Bug 13498 – Return type is not checked in function template

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-09-19T11:16:00Z
Last change time
2015-02-18T03:37:11Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
sinkuupump

Comments

Comment #0 by sinkuupump — 2014-09-19T11:16:34Z
Introduced by https://github.com/D-Programming-Language/dmd/pull/3979 The code below compiles with DMD v2.067-devel-5606406. int test1()() { return "foo"; // should fail as well } /+ int test2() { return "foo"; // Error: cannot implicitly convert expression ("foo") of type string to int } +/ void main() { test1(); }
Comment #1 by k.hara.pg — 2014-09-20T14:35:25Z
Comment #2 by github-bugzilla — 2014-09-20T14:49:10Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/4b632bcfb12586b3d87aa9d08afb79a516d9ef1c Revert pull request #2537 to fix git-head regression issue 13498 This reverts commit 875f2fe0314931ef86e597a3d87069c1b914c5bb, reversing changes made to f5c7e97f2b4ee12e5e486da130ebf69483693bc5. The changed absolutePath code essentially cannot work because the buildPath() result is not implicitly convertible to inout(char)[], but it was accidentally accepted by the regression 13498. https://github.com/D-Programming-Language/phobos/commit/1ff05c69453a553cbb9b94212b4524a47b8a0d0f Merge pull request #2544 from 9rnsr/fix13498 Revert pull request #2537 to fix git-head regression issue 13498
Comment #3 by github-bugzilla — 2014-09-20T17:35:39Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b158adbac6a2a0d5a91c545b8edb5a470754242e fix Issue 13498 - Return type is not checked in function template https://github.com/D-Programming-Language/dmd/commit/51d68740d13d1f5c5dc9373b91c38625ad00168e Merge pull request #4004 from 9rnsr/fix13498 [REG2.067a] Issue 13498 - Return type is not checked in function template
Comment #4 by github-bugzilla — 2015-02-18T03:37:11Z