[SR-10914] Swift 5.1 compiler fails to compile code containing Data created with an array literal. #53305
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 5.1
type checker
Area → compiler: Semantic analysis
Attachment: Download
Environment
Apple Swift version 5.1 (swiftlang-1100.0.38.29 clang-1100.0.20.14)
Additional Detail from JIRA
md5: cdc4e73c83b08acdad6a01763761c9da
Issue Description:
Xcode 11.0 beta (11M336w), Swift 5.1 compiler fails to compile code containing Data created with an array literal.
Open attached sample project.
Compile for the Simulator (iPhone Xr).
Observe the error: "DataWrapper.swift:28:17: error: expression type 'DataWrapper' is ambiguous without more context DataWrapper.create(from: Data("
Comment out the definition of the variable "thisDoesNotCompile"
Compile again.
Now it compiles. Please see the definition of the variable "thisCompiles" which uses an array literal of smaller size.
I am running Mac OS Mojave 10.14.5 and have both Xcode 10.2.1 (10E1001) and Xcode 11.0 beta (11M336w) installed.
The text was updated successfully, but these errors were encountered: