0

newToProgramming

class car { var topSpeed = 100 func drive() { print("blue car \(topSpeed)") } } class futhureCar : car { func fly() { print("flying") } } let myRide = car() myRide.topSpeed \\ This is where it says there is a unused value myRide.drive() let flyingCar = futhureCar() flyingCar.topSpeed \\ This is where it says there is a unused value flyingCar.drive() flyingCar.fly() ..\Playground\:23:8: error: expression resolves to an unused l-value myRide.topSpeed ~~~~~~~^~~~~~~~ ..\Playground\:27:11: error: expression resolves to an unused l-value flyingCar.topSpeed ~~~~~~~~~~^~~~~~~~

17th Dec 2018, 9:08 AM
Gary Marshall
Gary Marshall - avatar
2 Antworten
+ 1
Delete those two lines
17th Dec 2018, 1:29 PM
Gordon
Gordon - avatar
0
Thanks a million.
17th Dec 2018, 1:55 PM
Gary Marshall
Gary Marshall - avatar