Run swiftc -dump-ast on this file, the compilation will never finish. Removing values gradually from the array and you'll notice that the shorter the expression, the less time it takes.
"Copy the above code into Xcode, press “build,” and go get a coffee. Come back in 12 hours. Yes, the above dictionary literal code takes at least 12 hours to compile. The compilation time grows roughly exponentially with each employee that is added."
A commenter on that article proposes speeding up the compilation by adding a type annotation:
Attachment: Download
Additional Detail from JIRA
md5: 671f0ac06627b6519c1b4f035d41c57c
Issue Description:
Run swiftc -dump-ast on this file, the compilation will never finish. Removing values gradually from the array and you'll notice that the shorter the expression, the less time it takes.
long.swift
The text was updated successfully, but these errors were encountered: