From b2757892d553352feb59d70b1e7241ccdafa6905 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 25 May 2015 20:33:37 -0700 Subject: 1458 While pushing out color support in fake screens I realized I've been complecting the special-case of a special-case to transform literal-string arguments for 'new'. As a result I hadn't been catching bad habits like giving its arg the wrong type. Now we have cleaner separation of the two variants of 'new', a few more checks, and better error messages when we mis-call it. Aside: I've added a third goto target. Sliding into spaghetti? Keep an eye on it. This goto might become a common pattern: a layer hooking into a previous one to prevent it from happening. In this case new on literal-strings prevents the transform for new from triggering. --- 045closure_name.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '045closure_name.cc') diff --git a/045closure_name.cc b/045closure_name.cc index 237eee3c..66696fc6 100644 --- a/045closure_name.cc +++ b/045closure_name.cc @@ -21,7 +21,7 @@ recipe init-counter [ ] recipe increment-counter [ - default-space:address:array:location <- new space:literal, 30:literal + default-space:address:array:location <- new location:type, 30:literal 0:address:array:location/names:init-counter <- next-ingredient # outer space must be created by 'init-counter' above y:number/space:1 <- add y:number/space:1, 1:literal # increment y:number <- copy 234:literal # dummy -- cgit 1.4.1-2-gfad0 unctionaltests/test_muc.h?id=711c5b8e452f2ebc121474269812095153f27608'>tree commit diff stats
path: root/tests/functionaltests/test_muc.h
blob: 30a6c2c8752e5fb64b4db3971ceb4e77e63094b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13