From 2655ae726e607ba4caa88c088ffb77e50753aead Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 18 May 2016 17:05:22 -0700 Subject: 2974 Fix CI failure. --- 045closure_name.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to '045closure_name.cc') diff --git a/045closure_name.cc b/045closure_name.cc index 48a84442..1c365f2e 100644 --- a/045closure_name.cc +++ b/045closure_name.cc @@ -156,3 +156,23 @@ def f [ ] +error: don't know surrounding recipe of f +error: f: can't find a place to store x + +//: extra test for try_reclaim_locals() from previous layers +:(scenario local_scope_ignores_nonlocal_spaces) +def new-scope [ + new-default-space + x:address:number <- new number:type + *x:address:number <- copy 34 + return default-space:address:array:location +] +def use-scope [ + local-scope + outer:address:array:location <- next-ingredient + 0:address:array:location/names:new-scope <- copy outer:address:array:location + return *x:address:number/space:1 +] +def main [ + 1:address:array:location/raw <- new-scope + 2:number/raw <- use-scope 1:address:array:location/raw +] ++mem: storing 34 in location 2 -- cgit 1.4.1-2-gfad0