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 ~~~~~~~~~~^~~~~~~~
2 Respostas
+ 1
Delete those two lines
0
Thanks a million.