Swift Error: Editor placeholder in source file

后端 未结 7 690
长发绾君心
长发绾君心 2020-12-06 03:39

Hello I am implementing a graph data structure. When I try to build the application the I get the error \"Editor placeholder in source file\"

The full graph implemen

7条回答
  •  猫巷女王i
    2020-12-06 04:18

    Error is straight forward and its because of wrong placeholders you have used in function call. Inside init you are not passing any parameters to your function. It should be this way

    destination = Node("some key", neighbors: [edge1 , edge2], visited: true, lat: 23.45, long: 45.67) // fill up with your dummy values
    

    Or you can just initialise with default method

    destination = Node()
    

    UPDATE

    Add empty initialiser in your Node class

    init() {
    
    }
    

提交回复
热议问题