This is my class...

class Human {
  static var singCount = 0
  func sing() {
    print("Lalala")
    type(of: self).singCount += 1
  }

I wanna use
   Self.singCount += 1
but I can't use it. Why compiler complain use of Self?
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to