Decomissioning macro functions

This commit is contained in:
2020-12-09 13:35:34 -07:00
parent 27eefa147b
commit 00193a8fed
4 changed files with 0 additions and 50 deletions

View File

@@ -112,15 +112,6 @@ class BasicTestCase extends Test {
_testIf();
}
function testMacros() {
Assert.equals(7, BasicTestCase.incrementTwice(5));
var seasonsGreetings = "ho ";
Assert.equals("ho ho ho ", BasicTestCase.doTwiceString(() -> {
seasonsGreetings += "ho ";
}));
}
// TODO to really test typed variable definitions, check for compilation failure on a bad example
function testTypedDefvar() {
Assert.equals(8, BasicTestCase.myInt);

View File

@@ -92,18 +92,6 @@
(defvar :Int myInt 8)
(defmacrofun doTwiceInt [intOp]
,intOp
,intOp)
// I think this causes doTwiceInt's runtime function to be typed as requiring Quote<Int> and returning Int
(defun :Int incrementTwice [:Int val]
(doTwiceInt ++val))
(defmacrofun doTwiceString [stringOp]
,stringOp
,stringOp)
(defun myTryCatch [:Any e]
(try
(throw e)