fez-lisp 1.5.163 → 1.5.165

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.5.163",
5
+ "version": "1.5.165",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/check.js CHANGED
@@ -122,7 +122,7 @@ export const castType = (stats, type) => {
122
122
  export const castReturn = (stats, type) => {
123
123
  return (
124
124
  (stats[RETURNS][0] = type[RETURNS][0]),
125
- stats[RETURNS][1] && (stats[RETURNS][1] = type[RETURNS][1])
125
+ type[RETURNS][1] && (stats[RETURNS][1] = type[RETURNS][1])
126
126
  )
127
127
  }
128
128
  export const isGenericReturn = (stats) => stats[RETURNS].length === 3
@@ -1729,6 +1729,8 @@ export const typeCheck = (ast, ctx = SPECIAL_FORM_TYPES) => {
1729
1729
  )
1730
1730
  switch (first[VALUE]) {
1731
1731
  case KEYWORDS.IF:
1732
+ if (i === 0)
1733
+ setReturnRef(env[name][STATS], args[i][STATS])
1732
1734
  break
1733
1735
  default:
1734
1736
  // TODO fix this assigment