core: I messed up the refactoring. with-scope should go away, but so should with-variables with an empty hashtable too.

db4
Doug Coleman 2016-03-03 11:54:33 -08:00
parent 3fda77dbe8
commit b0fe6631c7
2 changed files with 5 additions and 4 deletions

View File

@ -16,9 +16,10 @@ IN: continuations.tests
: callcc-namespace-test ( -- ? ) : callcc-namespace-test ( -- ? )
[ [
"test-cc" set "test-cc" set
5 "x" [ 5 "x" set
H{ } clone [
6 "x" set "test-cc" get continue 6 "x" set "test-cc" get continue
] with-variable ] with-variables
] callcc0 "x" get 5 = ; ] callcc0 "x" get 5 = ;
{ t } [ 10 callcc1-test 10 iota reverse >vector = ] unit-test { t } [ 10 callcc1-test 10 iota reverse >vector = ] unit-test

View File

@ -68,11 +68,11 @@ SYMBOL: current-source-file
: with-source-file ( name quot -- ) : with-source-file ( name quot -- )
! Should be called from inside with-compilation-unit. ! Should be called from inside with-compilation-unit.
H{ } clone source-files [ H{ } clone [
[ [
path>source-file path>source-file
[ current-source-file set ] [ current-source-file set ]
[ definitions>> old-definitions set ] bi [ definitions>> old-definitions set ] bi
] dip ] dip
[ wrap-source-file-error ] recover [ wrap-source-file-error ] recover
] with-variable ; inline ] with-variables ; inline