Skip to content

fix(runtime): Do not hide property with more accessors #1226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 14, 2019

Conversation

mbektchiev
Copy link
Contributor

@mbektchiev mbektchiev commented Nov 13, 2019

A property can be defined from both a protocol and a base class.
Currently, the protocol definition takes precedence but there are
cases in which the other way around is correct.

  • (ObjCPrototype) Check the property descriptor of the base class and
    don't define it if the base one has more accessors.
  • (ObjCClassBuilder) When defining a property check for metadata both
    with and without considering protocols. Use the one with more accessors.
  • Add unit tests

PR Checklist

refs #1223

@cla-bot cla-bot bot added the cla: yes label Nov 13, 2019
@mbektchiev mbektchiev added this to the 6.3.0 milestone Nov 13, 2019
@mbektchiev mbektchiev added the bug label Nov 13, 2019
@mbektchiev mbektchiev self-assigned this Nov 13, 2019
@mbektchiev mbektchiev force-pushed the bektchiev/fix-readonly-property-from-protocol branch 2 times, most recently from 25f4e6d to f140fab Compare November 13, 2019 11:33
A property can be defined from both a protocol and a base class.
Currently if it is in a protocol it takes precedence but there are
cases which the other way around would be preferable.

* (ObjCPrototype) Check for property descriptor of base class and return that we
don't define it if the base one has more accessors.
* (ObjCClassBuilder) When defining a property check for metadata with
and without considering protocols. Use the one with more accessors.
* Add unit tests
@mbektchiev mbektchiev force-pushed the bektchiev/fix-readonly-property-from-protocol branch from f140fab to 3c3b083 Compare November 13, 2019 16:18
@mbektchiev mbektchiev merged commit c7a6a8f into master Nov 14, 2019
@mbektchiev mbektchiev deleted the bektchiev/fix-readonly-property-from-protocol branch November 14, 2019 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants