Fix map access with wrong key generic type
@@ -289,15 +289,16 @@ public class ExpressionAnalyzer
this.scope = requireNonNull(scope, "scope is null");
}
- @SuppressWarnings("SuspiciousMethodCalls")
@Override
public Type process(Node node, @Nullable StackableAstVisitorContext<Context> context)
{
+ if (node instanceof Expression) {
// don't double process a node
- Type type = expressionTypes.get(NodeRef.of(node));
+ Type type = expressionTypes.get(NodeRef.of(((Expression) node)));
if (type != null) {
return type;
}
+ }
return super.process(node, context);
}
