title: Objective-C parser problems with and static getter-function
body: <p>I've created a static getter-function:</p>
  
  <pre><code>@implementation MyClass
  
  static int aValue = 1;
  + (int) aValue { return aValue; }
  
  // other stuff here
  
  @end
  </code></pre>
  
  <p>and now I'm trying to access it in some different ways from another class:</p>
  
  <pre><code>@implementation AnotherClass
  
  - (void) aMethod {
      if (MyClass.aValue &gt; 0) { NSLog(@"Foobar"); } // No parser error
      if ((MyClass.aValue &gt; 0)) { NSLog(@"Foobar"); } // My parser doesn't like that
      if (([MyClass aValue] &gt; 0)) { NSLog(@"Foobar"); } // This is ok again
      if ((0|MyClass.aValue &gt; 0)) { NSLog(@"Foobar"); } // Gives a warning, but works
  }
  
  // other stuff here
  
  @end
  </code></pre>
  
  <p>As you can see the parser seems to have problems with static methods in nested boolean expressions, which is quite unfortunate, if you want to use &amp;&amp;, || and similar clauses.</p>
  
  <p>The full Xcode error message is "Expected ')' before the '.' token". Can someone explain the parser behaviour to me? Am I missing something important or is this a bug?</p>
  
  <p>Le Torbi</p>