Skip to content

Commit

Permalink
[Truffle] Fix incorrect guard argument in Array#[].
Browse files Browse the repository at this point in the history
* The current strategy should not accept the *value* to be in the generalize case.
  • Loading branch information
eregon committed Nov 1, 2016
1 parent 0120083 commit 85408f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/truffle/array/element_set_tags.txt

This file was deleted.

Expand Up @@ -78,7 +78,8 @@ public Object writeWithin(DynamicObject array, int index, Object value,
// Writing within an existing array with an incompatible type - need to generalise

@Specialization(guards = {
"isInBounds(array, index)", "currentStrategy.matches(array)", "!currentStrategy.accepts(array)", "generalizedStrategy.accepts(value)",
"isInBounds(array, index)", "currentStrategy.matches(array)",
"!currentStrategy.accepts(value)", "generalizedStrategy.accepts(value)",
}, limit = "ARRAY_STRATEGIES")
public Object writeWithinGeneralize(DynamicObject array, int index, Object value,
@Cached("of(array)") ArrayStrategy currentStrategy,
Expand Down

0 comments on commit 85408f4

Please sign in to comment.