<> Strange Error

后端 未结 6 1696
执念已碎
执念已碎 2020-12-15 02:43

I have encountered a situation where xcode stops auto-completing and if you try to write a variable that already been defined xcode says << error type>>

6条回答
  •  悲哀的现实
    2020-12-15 03:34

    Found out that the error goes away and autocomplete works again if i initialised the variable like this:

    var name: String = "my name"
    

    instead of :

    var name = "my name" as String
    

提交回复
热议问题