fez-lisp 1.6.61 → 1.6.62
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 +2 -2
- package/src/types.js +6 -1
package/package.json
CHANGED
package/src/check.js
CHANGED
@@ -47,7 +47,7 @@ import {
|
|
47
47
|
NUMBER_SUBTYPE,
|
48
48
|
UNKNOWN_SUBTYPE,
|
49
49
|
SubType,
|
50
|
-
|
50
|
+
GET_ARRAY_INFERENCE_SET
|
51
51
|
} from './types.js'
|
52
52
|
import {
|
53
53
|
Brr,
|
@@ -852,7 +852,7 @@ const resolveReturnType = ({
|
|
852
852
|
break
|
853
853
|
default:
|
854
854
|
{
|
855
|
-
if (returns[VALUE]
|
855
|
+
if (GET_ARRAY_INFERENCE_SET.has(returns[VALUE]))
|
856
856
|
resolveGetter({ rem, prop, name, env })
|
857
857
|
checkPredicateNameDeep(name, exp, exp.slice(1), returns)
|
858
858
|
// TODO: DRY
|
package/src/types.js
CHANGED
@@ -36,7 +36,12 @@ export const IS_ARGUMENT = 'is_arg'
|
|
36
36
|
export const NIL = 'nil'
|
37
37
|
export const TRUE_WORD = 'true'
|
38
38
|
export const FALSE_WORD = 'false'
|
39
|
-
export const
|
39
|
+
export const GET_ARRAY_INFERENCE_SET = new Set([
|
40
|
+
'array:get',
|
41
|
+
'array:at'
|
42
|
+
// 'array:first',
|
43
|
+
// 'array:last'
|
44
|
+
])
|
40
45
|
export class SubType {
|
41
46
|
constructor(args) {
|
42
47
|
this.types = []
|