fez-lisp 1.6.82 → 1.6.83
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/package.json +1 -1
- package/src/check.js +7 -5
package/package.json
CHANGED
package/src/check.js
CHANGED
@@ -662,7 +662,12 @@ const resolveGetter = ({ rem, prop, name, env, caller, exp }) => {
|
|
662
662
|
if (times === level - 1) {
|
663
663
|
setPropToType(env[name][STATS], prop, {
|
664
664
|
[TYPE_PROP]: types.length
|
665
|
-
? [
|
665
|
+
? [
|
666
|
+
type,
|
667
|
+
new SubType([
|
668
|
+
types.at(-1) === COLLECTION ? UNKNOWN : types.at(-1)
|
669
|
+
])
|
670
|
+
]
|
666
671
|
: [UNKNOWN]
|
667
672
|
})
|
668
673
|
} else {
|
@@ -924,15 +929,12 @@ const initArrayType = ({ rem, env }) => {
|
|
924
929
|
subT.add(head[1].types[0])
|
925
930
|
}
|
926
931
|
const [main, sub] = ret[0]
|
927
|
-
if (isSubType(sub) && sub.types.at(-1) === COLLECTION) sub.types.pop()
|
928
932
|
return {
|
929
933
|
[TYPE_PROP]: [APPLY],
|
930
934
|
[RETURNS]: [
|
931
935
|
COLLECTION,
|
932
936
|
isCollection
|
933
|
-
? new SubType(
|
934
|
-
isSubType(sub) ? [COLLECTION, ...sub] : [COLLECTION, main]
|
935
|
-
)
|
937
|
+
? new SubType(isSubType(sub) ? [COLLECTION, ...sub] : [COLLECTION])
|
936
938
|
: new SubType(isSubType(sub) ? [...sub] : [main])
|
937
939
|
]
|
938
940
|
}
|