Correct backing field references in property accessors

Description

Sample:

gets converted to:

We probably need to declare a backing field as _managedObjectModel,
and replace "managedObjectModel" with "_managedObjectModel" in the whole setter method body.

Environment

None

Activity

Show:
Alex Petuschak
November 15, 2016, 7:29 PM

P.S. Best conversion for the above sample (difficult!) is by using the lazy keyword and a closure:

Alex Petuschak
November 23, 2016, 10:54 AM
Edited

Another report (karl@cactuslab.com, see also test.h):

I have this ObjC method:

Which gets transformed into:

I’m sure this isn’t the easiest structure to spot but it might be a common one?

We can probably explicitly declare the backing field as private, and reference it (instead of converting to `self.` i.e.:

Assignee

Alex Petuschak

Reporter

Alex Petuschak

Labels

None

Git Branch Name

None

GitHub Issue

None

Components

Fix versions

Priority

High

Epic Name

Configure