Editor not showing some errors

Answered

I can write something like this in AppCode 2016.3, Build #OC-163.8703.23, built on November 28, 2016:

let homeView: UIView = {
let view = UIImageView()
view.image = UIImage(named: "home")
view.not_a_prop = "heyo"

return view
}()

...which should cause some compile-time errors to be shown in the editor: not returning UIView, accessing a prop of UIImageView that doesn't exist. However, AppCode seems to be fine with it. 

Thanks! Can't wait to finally fully move away from XCode!

0
1 comment
Official comment

Hi,

AppCode is using the same SourceKit service that Xcode uses. So, I see only one error expected here - for accessing "not_a_prop".

Is this the only code snippet that is causing problems or does the problem occur on specific project? Have you tried to rebuild the app in AppCode (sometimes SourceKit fails to show errors at once but after rebuild it starts working fine)?

In case the issue persists after rebuild, it would be great if you can replicate it in a brand-new basic project and share the project with us (best way - to file an issue in our tracker).

Please sign in to leave a comment.