compiler errors - Xcode 8.1 swift 3 take forever to compile this code -


i have class in project use swift 2.3. when migrated project swift 3, xcode took forever compile , saw stuck @ class. can not build whole project because of class. there way modify class project can built, took xcode forever compile piece of code. if removed several properties myclass, xcode compile again. has idea on how solve problem?

import foundation  class myclass: nsobject {      var id: string = ""     var uid: string = ""     var uname: string = ""     var fname: string = ""     var txt: string = ""     var hay: float = 0     var flag = false     var long: double = 0     var lat: double = 0     var altitude: double = 0     var course: double = 0     var speed: double = 0     var lname: string = ""     var city: string = ""     var country: string = ""     var sublocal: string = ""     var subarea: string = ""     var thumb: string = ""     var trash = false     var date: double = 0     var updated: double = 0     var furl: string = ""      func toanyobject() -> {         return [             "id": id,             "uid": uid,             "uname": uname,             "fname": fname,             "txt": txt,             "hay": hay,             "flag": flag,             "long": long,             "lat": lat,             "altitude": altitude,             "course": course,             "speed": speed,             "lname": lname,             "city": city,             "country": country,             "sublocal": sublocal,             "trash": trash,             "subarea": subarea,             "thumb": thumb,             "date": date,             "updated": updated,             "furl": furl         ]     } } 

rewrite without big dictionary literal. so:

func toanyobject() -> {     var d = [string:any]()     d["id"] = id     d["uid"] = uid     // ... , on ...     return d } 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -