Skip to content

Commit

Permalink
Dict
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroPatti committed Aug 21, 2022
1 parent 5d3d76d commit f6ff54b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.util.Set;
import java.util.logging.Level;
import javax.annotation.Nullable;
import net.starlark.java.eval.Dict;
import net.starlark.java.eval.EvalException;
import net.starlark.java.eval.Printer;
import net.starlark.java.eval.Sequence;
Expand Down Expand Up @@ -570,11 +571,11 @@ public Map<KeyT, ValueT> convert(Object x, Object what, LabelConverter labelConv

@Override
public Map<KeyT, ValueT> concat(Iterable<Map<KeyT, ValueT>> iterable) {
ImmutableMap.Builder<KeyT, ValueT> output = new ImmutableMap.Builder<>();
Dict.Builder<KeyT, ValueT> output = new Dict.Builder<>();
for (Map<KeyT, ValueT> map: iterable){
output.putAll(map);
}
return output.buildKeepingLast();
return output.buildImmutable();
}

@Override
Expand Down

0 comments on commit f6ff54b

Please sign in to comment.