fez-lisp 1.5.111 → 1.5.112
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 +8 -1
package/package.json
CHANGED
package/src/check.js
CHANGED
@@ -847,7 +847,14 @@ export const typeCheck = (ast, error = true) => {
|
|
847
847
|
if (!isResLeaf) {
|
848
848
|
const name = rest[i][0][VALUE]
|
849
849
|
if (!env[name]) continue
|
850
|
-
if (
|
850
|
+
if (name === KEYWORDS.IF) {
|
851
|
+
const concequent = [...rest]
|
852
|
+
const alternative = [...rest]
|
853
|
+
concequent[i] = rest[i][1]
|
854
|
+
alternative[i] = rest[i][2]
|
855
|
+
check([first, ...concequent], env, scope)
|
856
|
+
check([first, ...alternative], env, scope)
|
857
|
+
} else if (
|
851
858
|
!isUnknownReturn(env[name][STATS]) &&
|
852
859
|
!compareTypeWithReturn(args[i][STATS], env[name][STATS])
|
853
860
|
)
|