title: Modern Objective-C and @synthesize
body: <p>I'm trying convert my code to Modern Objective-C style. How i read here <a href="http://www.techotopia.com/index.php/The_Basics_of_Modern_Objective-C" rel="nofollow">http://www.techotopia.com/index.php/The_Basics_of_Modern_Objective-C</a>": "In the case of Modern Objective-C, however, the synthesis takes place by default, making the use of @synthesize declarations unnecessary. When using default property synthesize, instance variable properties are accessible from within code using the property name prefixed with an underscore."</p>
  
  <p>However, I have:</p>
  
  <p>Relationship.h</p>
  
  <pre><code>@interface Relationship : NSObject &lt;NSCoding&gt;
  //...
  @property(nonatomic, weak) Person* first;
  //...
  @end`
  </code></pre>
  
  <p>OtherRelationship.h</p>
  
  <pre><code>#import "Relationship.h"
  
  @interface OtherRelationship : Relationship
  
  @end
  </code></pre>
  
  <p>OtherRelationship.m</p>
  
  <pre><code>#import "OtherRelationship.h"
  
  @implementation OtherRelationship
  
  @synthesize first = _first;
  
  - (void)foo
  {
  NSLog(@"%@", _first);
  }
  </code></pre>
  
  <p>and it's working. But when i delete </p>
  
  <pre><code> @synthesize first = _first;
  </code></pre>
  
  <p>i get "Use of undeclared identifier '_first'" error. Does inheritanced variables doesn't work with autosynthesize or should i looking for problem elsewhere?</p>