Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-11296] There should at least be a warning for ineffectual use of lazy #53697

Open
dabrahams opened this issue Aug 12, 2019 · 1 comment
Open
Labels
compiler The Swift compiler in itself improvement

Comments

@dabrahams
Copy link
Collaborator

Previous ID SR-11296
Radar None
Original Reporter @dabrahams
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement
Assignee None
Priority Medium

md5: def37ef98feee315315d09833e4ec7f2

Issue Description:

This compiles without complaint. Something should tell me not to write lazy here.

func f() -> [Int] { return (0...10).lazy.map { $0 } }
@belkadan
Copy link
Contributor

What's the rule?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself improvement
Projects
None yet
Development

No branches or pull requests

2 participants