@nudojs/core 1.7.8 → 1.7.9

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -786,6 +786,15 @@ function flattenSumArms(ret) {
786
786
  function isWidenedSumArm(m, parent) {
787
787
  return parent.conf === "partial" && m.shape.k === "prim" && !m.term && (!m.pred || m.pred.op === "true");
788
788
  }
789
+ function provesBarePrimDomain(arm, constraint) {
790
+ if (!constraint.prim || constraint.preds.length > 0 || isIntFlag(constraint)) {
791
+ return false;
792
+ }
793
+ if (constraint.fields || constraint.element || constraint.members || constraint.fn) {
794
+ return false;
795
+ }
796
+ return arm.shape.k === "prim" && arm.shape.type === constraint.prim;
797
+ }
789
798
  function assertImplies(ret, constraint, opts) {
790
799
  const phi = opts?.phi ?? pTrue;
791
800
  if (ret.shape.k === "never") return proved();
@@ -820,6 +829,9 @@ function assertSumArms(arms, parent, constraint, opts, phi) {
820
829
  continue;
821
830
  }
822
831
  if (isValueSetUnknown(arm) || isWidenedSumArm(arm, parent)) {
832
+ if (isWidenedSumArm(arm, parent) && provesBarePrimDomain(arm, constraint)) {
833
+ continue;
834
+ }
823
835
  sawUnprovable = true;
824
836
  continue;
825
837
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nudojs/core",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },