title: Why can't I initialize a static variable by calling a static function in Swift?
body: <p>It is my understanding that as of Xcode 6.3 / Swift 1.2, I can use static variables and methods inside of a class.  However, the compiler doesn't like it when I try to initialize a static variable by calling a static function (I get the error 'Use of unresolved identifier getDefaultString' in the example below).  Here is a snippet that demonstrates my problem:</p>
  
  <pre><code>import Foundation
  
  public class Settings {
      private static var _bundle = NSBundle.mainBundle()
      static func getDefaultString(key: String) -&gt; String {
          return _bundle.objectForInfoDictionaryKey(key) as! String
      }
  
      private static var _server = getDefaultString("DefaultServer")
      public class var server: String {
          get { return _server }
          set { _server = newValue }
      }
  }
  </code></pre>
  
  <p>Can someone help me understand why I can't do this?</p>