D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 12814 - Defining type inference Lambda function with default argument
Summary: Defining type inference Lambda function with default argument
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P3 minor
Assignee: No Owner
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2014-05-28 02:37 UTC by Jesse Phillips
Modified: 2024-12-13 18:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jesse Phillips 2014-05-28 02:37:57 UTC
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 dlangBugzillaToGithub 2024-12-13 18:21:08 UTC
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