Bug 12814 – Defining type inference Lambda function with default argument

Status
NEW
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2014-05-28T02:37:57Z
Last change time
2024-12-13T18:21:08Z
Keywords
diagnostic
Assigned to
No Owner
Creator
Jesse Phillips
Moved to GitHub: dmd#18833 →

Comments

Comment #0 by Jesse.K.Phillips+D — 2014-05-28T02:37:57Z
The below code provides an incorrect error. It is not to claim that the code should or should not be an error. auto lam = (cx = 3) { cx = 10; }; Error: cx is used as a type This could create a lambda which takes an int, or it could error out with "cannot deduce type from default arguments" This is similar to: #10491
Comment #1 by robert.schadek — 2024-12-13T18:21:08Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18833 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB