Bug 12605 – Calculate proper common type of lambdas

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-21T04:08:24Z
Last change time
2024-12-13T18:19:52Z
Assigned to
No Owner
Creator
Kenji Hara
Moved to GitHub: dmd#17653 →

Comments

Comment #0 by k.hara.pg — 2014-04-21T04:08:24Z
Currently this code: pragma(msg, typeof(true ? (x => x) : ((int x) => x * 2))); prints 'void'. But it could print 'int function(int)' by fitting parameter types. More cases: pragma(msg, typeof(true ? (()=>1) : (()=>1.0))); // fitting return types - could be 'double function()' pragma(msg, typeof(true ? ((int x) => 1) : (delegate(int x)=>1))); // fitting context type --> could be 'int delegate(int)'
Comment #1 by robert.schadek — 2024-12-13T18:19:52Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17653 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB