aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java
diff options
context:
space:
mode:
authorJon Bratseth <jonbratseth@yahoo.com>2018-02-22 16:20:48 +0100
committerGitHub <noreply@github.com>2018-02-22 16:20:48 +0100
commit1791ba9fc169c821bee826ed39d9a42ffa03def0 (patch)
tree4601457cb3cdf0cc2a4b84efc44668748edfd8f3 /searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java
parent7358ce6a49eedf51b3761a855921c58a5f813321 (diff)
Revert "Revert "Bratseth/typecheck all 3""
Diffstat (limited to 'searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java')
-rwxr-xr-xsearchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java
index f55ed59b65c..f1adf331630 100755
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/NameNode.java
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchlib.rankingexpression.rule;
+import com.yahoo.searchlib.rankingexpression.Reference;
import com.yahoo.searchlib.rankingexpression.evaluation.Context;
import com.yahoo.searchlib.rankingexpression.evaluation.Value;
import com.yahoo.tensor.TensorType;
@@ -14,6 +15,7 @@ import java.util.Deque;
*
* @author Simon Thoresen
*/
+// TODO: This is achieved by ReferenceNode in almost all cases - remove this
public final class NameNode extends ExpressionNode {
private final String name;
@@ -32,7 +34,7 @@ public final class NameNode extends ExpressionNode {
}
@Override
- public TensorType type(TypeContext context) { throw new RuntimeException("Named nodes can not have a type"); }
+ public TensorType type(TypeContext<Reference> context) { throw new RuntimeException("Named nodes can not have a type"); }
@Override
public Value evaluate(Context context) {