disable ifLet in defMacro bodies
This commit is contained in:
@@ -79,4 +79,14 @@
|
||||
|
||||
(function _testSetMacroVar []
|
||||
(Assert.equals 1 (_testSetMacroVarMacro))
|
||||
(Assert.equals 2 (_testSetMacroVarMacro)))
|
||||
(Assert.equals 2 (_testSetMacroVarMacro)))
|
||||
|
||||
// ifLet and its derivatives should be disabled in defMacro bodies:
|
||||
(defMacro _testIfLetDisabledMacro []
|
||||
(assertThrows (ifLet [a "b"] a))
|
||||
(assertThrows (whenLet [a "b"] a))
|
||||
(assertThrows (unlessLet [a "b"] a))
|
||||
`null)
|
||||
|
||||
(function _testIfLetDisabled []
|
||||
(_testIfLetDisabledMacro))
|
||||
|
Reference in New Issue
Block a user