fez-lisp 1.5.152 → 1.5.154
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/lib/baked/std.js +1 -1
- package/package.json +1 -1
- package/src/check.js +9 -12
package/package.json
CHANGED
package/src/check.js
CHANGED
@@ -1686,7 +1686,14 @@ export const typeCheck = (ast) => {
|
|
1686
1686
|
} else {
|
1687
1687
|
const name = rest[i][0][VALUE]
|
1688
1688
|
if (!env[name]) continue
|
1689
|
-
if (
|
1689
|
+
else if (name === KEYWORDS.IF) {
|
1690
|
+
const concequent = [...rest]
|
1691
|
+
const alternative = [...rest]
|
1692
|
+
concequent[i] = rest[i][2]
|
1693
|
+
alternative[i] = rest[i][3]
|
1694
|
+
check([first, ...concequent], env, scope)
|
1695
|
+
check([first, ...alternative], env, scope)
|
1696
|
+
} else if (
|
1690
1697
|
isUnknownReturn(env[name][STATS]) &&
|
1691
1698
|
!env[name][STATS][IS_ARGUMENT]
|
1692
1699
|
)
|
@@ -1696,17 +1703,7 @@ export const typeCheck = (ast) => {
|
|
1696
1703
|
stack,
|
1697
1704
|
() => check(exp, env, scope)
|
1698
1705
|
)
|
1699
|
-
|
1700
|
-
if (isSpecial && name === KEYWORDS.IF) {
|
1701
|
-
const concequent = [...rest]
|
1702
|
-
const alternative = [...rest]
|
1703
|
-
concequent[i] = rest[i][2]
|
1704
|
-
alternative[i] = rest[i][3]
|
1705
|
-
check([first, ...concequent], env, scope)
|
1706
|
-
check([first, ...alternative], env, scope)
|
1707
|
-
}
|
1708
|
-
|
1709
|
-
if (
|
1706
|
+
else if (
|
1710
1707
|
env[name] &&
|
1711
1708
|
getType(env[name][STATS]) === APPLY &&
|
1712
1709
|
!SPECIAL_FORMS_SET.has(name)
|