diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-02-06 22:18:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 22:18:12 +0100 |
commit | 4062af167c5f1415d7f3f2eb0792447dafbf5096 (patch) | |
tree | 368cada4a98a52f78abf2ff1f23b48f7f85b93a2 /searchlib | |
parent | c2797cb1f2745a1fee89610e6eb7a4c1d3215c18 (diff) |
Revert "Bratseth/typecheck all"
Diffstat (limited to 'searchlib')
-rwxr-xr-x | searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNode.java | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNode.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNode.java index b9b377dc0ec..05a6773c5cb 100755 --- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNode.java +++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ReferenceNode.java @@ -60,10 +60,6 @@ public final class ReferenceNode extends CompositeNode { @Override public String toString(SerializationContext context, Deque<String> path, CompositeNode parent) { - return toString(context, path, true); - } - - private String toString(SerializationContext context, Deque<String> path, boolean includeOutput) { if (path == null) path = new ArrayDeque<>(); String myName = this.name; @@ -105,21 +101,14 @@ public final class ReferenceNode extends CompositeNode { } ret.append(")"); } - if (includeOutput) - ret.append(myOutput != null ? "." + myOutput : ""); + ret.append(myOutput != null ? "." + myOutput : ""); return ret.toString(); } @Override public TensorType type(TypeContext context) { - // Ensure base name (excluding output exists, - // but don't support outputs of different tensor types (not used, so no need) - String name = toString(new SerializationContext(), null, false); - TensorType type = context.getType(name); - - if (type == null) - throw new IllegalArgumentException("Unknown feature '" + toString() + "'"); - return type; + // Don't support outputs of different type, for simplicity + return context.getType(toString()); } @Override |