r/iOSProgramming • • Dec 05 '24

Humor Xcode is great except when it isn't

Post image
373 Upvotes

69 comments sorted by

View all comments

0

u/BoseSJ Dec 05 '24

Well, i encountered this while using the .map too intuitively

var = someArr.map { 
    val: val, 
    val: valArr.map {...}, 
    val: valArr.map{...},
    val: val
}

Later when I broke into more statements, I found out there is a mismatch in type. Something supposed to receive String, i was assigning it Int. Xcode failed to detect that. And the compiler freaked out.