diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java b/src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java index a7c3abeb62..05021e6f8a 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java +++ b/src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java @@ -15,8 +15,8 @@ package com.google.devtools.build.lib.query2.engine; import com.google.common.base.Function; import com.google.devtools.build.lib.query2.engine.QueryEnvironment.QueryTaskFuture; +import com.google.devtools.build.lib.query2.engine.QueryEnvironment.ThreadSafeMutableSet; import java.util.Collection; -import java.util.Set; import java.util.regex.Pattern; /** @@ -74,11 +74,12 @@ class LetExpression extends QueryExpression { return env.immediateFailedFuture( new QueryException(this, "invalid variable name '" + varName + "' in let expression")); } - QueryTaskFuture<Set<T>> varValueFuture = QueryUtil.evalAll(env, context, varExpr); - Function<Set<T>, QueryTaskFuture<Void>> evalBodyAsyncFunction = - new Function<Set<T>, QueryTaskFuture<Void>>() { + QueryTaskFuture<ThreadSafeMutableSet<T>> varValueFuture = + QueryUtil.evalAll(env, context, varExpr); + Function<ThreadSafeMutableSet<T>, QueryTaskFuture<Void>> evalBodyAsyncFunction = + new Function<ThreadSafeMutableSet<T>, QueryTaskFuture<Void>>() { @Override - public QueryTaskFuture<Void> apply(Set<T> varValue) { + public QueryTaskFuture<Void> apply(ThreadSafeMutableSet<T> varValue) { VariableContext<T> bodyContext = VariableContext.with(context, varName, varValue); return env.eval(bodyExpr, bodyContext, callback); } |