You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apple Swift version 5.4 (swiftlang-1205.0.26.4 clang-1205.0.19.54)
Target: arm64-apple-darwin20.3.0
(There's a similar error using Xcode 12.4.)
Additional Detail from JIRA
Votes
0
Component/s
Labels
Bug, Parser
Assignee
None
Priority
Medium
md5: 569b2c90e0becb673376a3effaea699f
Issue Description:
structModel: Codable {}
classController {
privatevarmodel: Model = Model() {
willset { // this should be willSet (capital S)print("will set")
}
didSet {
print("new value is \(self)")
}
}
}
This produces the following diagnostic when compiled on the command line:
$ swift /Users/igeek/Desktop/BadError.swift
/Users/igeek/Desktop/BadError.swift:4:40: error: trailing closure passed to parameter of type 'Decoder' that does not accept a closure
private var model: Model = Model() {
^
BadError.Model (internal):3:14: note: 'init(from:)' declared here
internal init(from decoder: Decoder) throws
^
The text was updated successfully, but these errors were encountered:
Environment
Xcode 12.5 (12E5244e) on macOS 11.2.3 (20D91)
Apple Swift version 5.4 (swiftlang-1205.0.26.4 clang-1205.0.19.54)
Target: arm64-apple-darwin20.3.0
(There's a similar error using Xcode 12.4.)
Additional Detail from JIRA
md5: 569b2c90e0becb673376a3effaea699f
Issue Description:
This produces the following diagnostic when compiled on the command line:
The text was updated successfully, but these errors were encountered: