fez-lisp 1.5.27 → 1.5.28

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/package.json +1 -1
  2. package/src/check.js +8 -1
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.5.27",
5
+ "version": "1.5.28",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/check.js CHANGED
@@ -502,7 +502,14 @@ export const typeCheck = (ast) => {
502
502
  const isSpecial = SPECIAL_FORMS_SET.has(first[VALUE])
503
503
 
504
504
  if (first[TYPE] === APPLY && !isSpecial) {
505
- if (!env[first[VALUE]][STATS][ARGS_COUNT]) {
505
+ if (env[first[VALUE]][STATS].type === ATOM) {
506
+ errorStack.set(
507
+ key,
508
+ `(${first[VALUE]}) is not a (lambda) (${stringifyArgs(
509
+ exp
510
+ )})`
511
+ )
512
+ } else if (!env[first[VALUE]][STATS][ARGS_COUNT]) {
506
513
  env[first[VALUE]][STATS][RETURNS] = UNKNOWN
507
514
  env[first[VALUE]][STATS].type = APPLY
508
515
  env[first[VALUE]][STATS][ARGS_COUNT] = rest.length