Skip to content
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

Throw error when overriding properties without getter/setter. #517

Merged
merged 1 commit into from
Feb 29, 2016

Conversation

jasssonpet
Copy link
Contributor

Throw error when overriding a (non-readonly) native property without both a getter/setter function:

@interface TNSBaseInterface : NSObject
@property int baseProperty;
@end
TNSBaseInterface.extend({
    get baseProperty() {
        console.log('get');
        return this.super.baseProperty;
    },
    // set baseProperty(value) {
    //     console.log('set');
    //     this.super.baseProperty = value;
    // },
});

@jasssonpet jasssonpet added this to the 1.7.0 (Under Review) milestone Feb 19, 2016
@fealebenpae
Copy link
Contributor

👍 It is right to protect this condition with an error so that the runtime doesn't crash.

@jasssonpet jasssonpet self-assigned this Feb 19, 2016
jasssonpet added a commit that referenced this pull request Feb 29, 2016
Throw error when overriding properties without getter/setter.
@jasssonpet jasssonpet merged commit 52a6734 into master Feb 29, 2016
@jasssonpet jasssonpet deleted the jasssonpet/properties branch February 29, 2016 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants