title: Why do I get "Static member '...' cannot be used on instance of type '...'" error?
body: <p>Here is a straightforward use of a static member inside an instance method:</p>
  
  <pre><code>public struct RankSet {
      private let rankSet : UInt8
      static let counts : [UInt8] = [
          0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
          ... // More of the same
          4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
      ]
      public var count : Int {
          get {
              // The error is on the following line
              return Int(counts[Int(rankSet)])
          }
      }
  }
  </code></pre>
  
  <p>Swift produces the following error:</p>
  
  <blockquote>
    <p>Static member <code>'counts'</code> cannot be used on instance of type <code>'RankSet'</code></p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/4hCy5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4hCy5.png" alt="Screenshot"></a></p>
  
  <p>Since static members are shared among all instances of my class, all instance members, including <code>count</code>, should have access to the <code>counts</code> member. What is going on here?</p>