mol_mutable 0.0.1062 → 0.0.1064

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/node.test.js CHANGED
@@ -534,7 +534,7 @@ var $;
534
534
  if (this[$mol_ambient_ref])
535
535
  return this[$mol_ambient_ref];
536
536
  const owner = $mol_owning_get(this);
537
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
537
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
538
538
  }
539
539
  set $(next) {
540
540
  if (this[$mol_ambient_ref])
@@ -588,7 +588,7 @@ var $;
588
588
  ;
589
589
  "use strict";
590
590
  var $;
591
- (function ($) {
591
+ (function ($_1) {
592
592
  $mol_test({
593
593
  'init with overload'() {
594
594
  class X extends $mol_object {
@@ -601,6 +601,13 @@ var $;
601
601
  });
602
602
  $mol_assert_equal(x.foo(), 2);
603
603
  },
604
+ 'Context in instance inherits from class'($) {
605
+ const custom = $.$mol_ambient({});
606
+ class X extends $.$mol_object {
607
+ static $ = custom;
608
+ }
609
+ $mol_assert_equal(new X().$, custom);
610
+ },
604
611
  });
605
612
  })($ || ($ = {}));
606
613