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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "fez-lisp",
3
3
  "description": "Lisp interpreted & compiled to JavaScript",
4
4
  "author": "AT290690",
5
- "version": "1.6.61",
5
+ "version": "1.6.62",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/check.js CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  NUMBER_SUBTYPE,
48
48
  UNKNOWN_SUBTYPE,
49
49
  SubType,
50
- GET_ARRAY_INFERENCE
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] === GET_ARRAY_INFERENCE)
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 GET_ARRAY_INFERENCE = 'array:get'
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 = []