Open
Description
Previous ID | SR-11827 |
Radar | rdar://problem/57418525 |
Original Reporter | @dabrahams |
Type | Bug |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: 29d9832455f9840f7ae31e4c0ca0baec
Issue Description:
1> (0..<10).map { x
2. x + 1
3. }
error: repl.swift:1:10: error: cannot invoke 'map' with an argument list of type '(@escaping () -> ())'
(0..<10).map { x
^
repl.swift:1:10: note: expected an argument list of type '((Self.Element) throws -> T)'
(0..<10).map { x
^
I've also seen, "Contextual type for closure argument list expects 1 argument, which cannot be implicitly ignored" (small reproducer harder to generate). Either way we should have an error saying "in" is missing and a fixit to insert it.