This fails in Swift 5.2 / Xcode 11.4 with the following error:
error: 'init(wrappedValue:printingInitialValue:)' parameter type ('Any') must be the same as its 'wrappedValue' property type ('Any?') or an @autoclosure thereof
init(wrappedValue: Any, printingInitialValue: Bool = true) {
I think this ought to be allowed, as Any is compatible with Any? everywhere else in the language.
Environment
Swift 5.2Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: b26dd8a4c28f0c88eae100f6c11a6493Issue Description:
Consider the following slightly contrived example:
This fails in Swift 5.2 / Xcode 11.4 with the following error:
I think this ought to be allowed, as
Any
is compatible withAny?
everywhere else in the language.