I doubt it'll be "fixed" in the next release (which came out less than 24
hours ago), but I gather type checker speed optimisations and fixing
crashes are ongoing goals of the compiler team. With no guarantees or
expectations, you may find your code compiles in an acceptable time with
Swift 4 (Xcod
> Am 06.06.2017 um 09:02 schrieb Jens Persson via swift-users
> :
>
> When compiling that from the command line, I get the following (after about 6
> seconds):
>
> test.swift:7:18: error: cannot assign through subscript: 'dp' is a 'let'
> constant
> dp[0][0] = 0
> ~~ ^
>
What version of Swift are you using, and what exactly do you mean by 'Xcode
cannot stop’? It seems like you might be using an older version of Swift, and
have hit upon a compiler bug/performance issue that has since been fixed.
This code fails to compile for me in Swift 3.1:
'let dp' should be
When compiling that from the command line, I get the following (after about
6 seconds):
test.swift:7:18: error: cannot assign through subscript: 'dp' is a 'let'
constant
dp[0][0] = 0
~~ ^
/.../
After fixing that (changing let dp to var dp), it will compile
successfully, stil
What does the Archival & Serialization SE-0166 mean by:
> Some libraries, like SwiftyJSON, do this [interface between JSON and
Swift] at the cost of type safety; others, like ObjectMapper and Argo
below, maintain type safety by offering archival functionality for JSON
types (
https://github.com/ap
Hi Swift-Users,
when I compiled the code, Xcode cannot stop, I do not know why. It is
very strange. Can anyone help ? Here is the code. I am using Xcode 8.1
class Solution {
func rob(nums: [Int]) -> Int {
guard nums.count > 0 else { return 0 }
let dp = Array.init(repeat