Skip to content

Commit

Permalink
Rollback for-loop behavior for @. Repair tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andyfischer committed Mar 21, 2014
1 parent 3a9a1f9 commit 37365f9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion BUGS
@@ -1,6 +1,6 @@

Miscellanous (most-recent first)

Can't use a type before it's defined. Should be able to post-define it like functions.

Method lookup cache:
Expand Down
4 changes: 2 additions & 2 deletions src/loops.cpp
Expand Up @@ -224,10 +224,10 @@ Term* loop_get_primary_result(Block* block)
Term* iterator = for_loop_get_iterator(block);

// For a rebound list, use the last term that has the iterator's
// name, if it's been explicitly renamed.
// name.
if (block->owningTerm->boolProp(sym_ModifyList, false)) {
Term* term = block->get(iterator->name);
if (term != NULL && term->function != FUNCS.get_index)
if (term != NULL)
return term;
}

Expand Down
6 changes: 0 additions & 6 deletions tests/for/list_rebind_implicit_output.ca

This file was deleted.

32 changes: 16 additions & 16 deletions tests/stdlib/json_test.ca.output
@@ -1,16 +1,16 @@
parsed string '1' as 1
parsed string '1.0' as 1.0
parsed string '"a"' as a
parsed string '"abc"' as abc
parsed string '[1]' as [1]
parsed string '[1, 2]' as [1, 2]
parsed string ' [ 1 , 2 ] ' as [1, 2]
parsed string '["a", "b", 1.0, 2.0]' as ['a', 'b', 1.0, 2.0]
parsed string '-1' as -1
parsed string '[-1, -2]' as [-1, -2]
parsed string 'true' as true
parsed string 'false' as false
parsed string 'null' as null
parsed string '{}' as {}
parsed string '{"a":"b"}' as {a: 'b'}
parsed string '{"a":"b", "c":"d"}' as {a: 'b', c: 'd'}
1 -> 1 -> 1
1.0 -> 1.0 -> 1.0
"a" -> a -> "a"
"abc" -> abc -> "abc"
[1] -> [1] -> [1]
[1, 2] -> [1, 2] -> [1, 2]
[ 1 , 2 ] -> [1, 2] -> [1, 2]
["a", "b", 1.0, 2.0] -> ['a', 'b', 1.0, 2.0] -> ["a", "b", 1.0, 2.0]
-1 -> -1 -> -1
[-1, -2] -> [-1, -2] -> [-1, -2]
true -> true -> true
false -> false -> false
null -> null -> null
{} -> {} -> {}
{"a":"b"} -> {a: 'b'} -> {"a": "b"}
{"a":"b", "c":"d"} -> {a: 'b', c: 'd'} -> {"a": "b", "c": "d"}
File renamed without changes.

0 comments on commit 37365f9

Please sign in to comment.