diff options
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/TypeResolver.java')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/tensor/TypeResolver.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/TypeResolver.java b/vespajlib/src/main/java/com/yahoo/tensor/TypeResolver.java index 37a4bf375d0..f9bc9072cfa 100644 --- a/vespajlib/src/main/java/com/yahoo/tensor/TypeResolver.java +++ b/vespajlib/src/main/java/com/yahoo/tensor/TypeResolver.java @@ -153,6 +153,10 @@ public class TypeResolver { map.put(dim.name(), dim); } else if (firstIsBoundSecond(other, dim)) { map.put(dim.name(), other); + } else if (dim.isMapped() && other.isIndexed()) { + map.put(dim.name(), dim); // {} and [] -> {}. Note: this is not allowed in C++ + } else if (dim.isIndexed() && other.isMapped()) { + map.put(dim.name(), other); // {} and [] -> {}. Note: this is not allowed in C++ } else { throw new IllegalArgumentException("Unequal dimension " + dim.name() + " in " + lhs+ " and "+rhs); } |