#18842 closed defect (fixed)
declare only merges "-chains-" in mixins (not superclasses)
Reported by: | Bryan Forbes | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.11.3 |
Component: | Core | Version: | 1.11.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The following code demonstrates the issue:
var A = declare([], { '-chains-': { initialize: 'after' }, initialize: function () { console.log('initialize in A'); }, other: function () { console.log('other in A'); }, postscript: function () { this.inherited(arguments); this.initialize(); } }); var B = declare(A, { '-chains-': { other: 'after' }, initialize: function () { console.log('initialize in B'); }, other: function () { console.log('other in B'); }, postscript: function () { this.inherited(arguments); this.other(); } }); new A(); // logs out the following (expected): // initialize in A new B(); // logs out the following (unexpected): // initialize in B // other in A // other in B
The following code in declare.js
is only taking into account mixins and not the superclass:
// collect chains and flags for(i = mixins - 1; i; --i){ // intentional assignment t = bases[i]._meta; if(t && t.chains){ chains = mix(chains || {}, t.chains); } }
Change History (5)
comment:1 Changed 5 years ago by
Component: | General → Core |
---|---|
Milestone: | tbd → 1.11.3 |
comment:2 Changed 5 years ago by
Owner: | set to Michael Van Sickle <[email protected]…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
In d1d3bcd/dojo: