Lord Fresh
Lord Fresh

Reputation: 636

xcode wants " " instead " "

From time to time i get this error and Its no problem to fix, but I wanna learn how to prevent this:

this code gives error:

if let predecessor = myTree.getNode(withValue: 7)?.predecessor()?.key {
    print("Predecessor to 7 should be 5: ", predecessor)
}

the error is the space after "key" not working

But if i replace with with a new space:

if let predecessor = myTree.getNode(withValue: 7)?.predecessor()?.key {
    print("Predecessor to 7 should be 5: ", predecessor)
}

enter image description here

it runs just fine. Does anyone know what gives?

Upvotes: 1

Views: 74

Answers (1)

Lord Fresh
Lord Fresh

Reputation: 636

Solution is to try to avoid holding alt while pressing the spacebar :)

Upvotes: 1

Related Questions