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

Applied mixins do not define the __nextSuper property correctly #5463

Closed
mixonic opened this issue Aug 21, 2014 · 3 comments
Closed

Applied mixins do not define the __nextSuper property correctly #5463

mixonic opened this issue Aug 21, 2014 · 3 comments

Comments

@mixonic
Copy link
Member

mixonic commented Aug 21, 2014

See jsbin.

var item = { foo: 'bar' }
var array = [item];
var MyArrayMixin = Ember.Mixin.create({
  contains: function(){
    return this._super();
  }
});

MyArrayMixin.apply(array);

// Should be true, false is false, false
console.log(
  array.hasOwnProperty('__nextSuper'),
  array.propertyIsEnumerable('__nextSuper')
);

array.contains();

// Should be true, false is true, true
console.log(
  array.hasOwnProperty('__nextSuper'),
  array.propertyIsEnumerable('__nextSuper')
);

Currently __nextSuper is defined in the makeCtor function, which is only called when creating a new object. Array are really just mixins applied to array instance, and as such never call the constructor. __nextSuper should be set on them during instantiation with the correct non-enumerable configuration.

Is similar to #4970, but this is for the general case. That specific issue on contains was addressed by #5444.

Could be addressed by #5430. May ref #5464

@wagenet
Copy link
Member

wagenet commented Nov 1, 2014

@mixonic any updates here?

@mixonic
Copy link
Member Author

mixonic commented Nov 2, 2014

No, sadly. I would like to keep tracking this though.

@rwjblue
Copy link
Member

rwjblue commented Aug 23, 2015

Closed by #12062.

@rwjblue rwjblue closed this as completed Aug 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants