diff options
author | Stephan Herrmann | 2014-02-16 22:49:59 +0000 |
---|---|---|
committer | Stephan Herrmann | 2014-02-16 22:49:59 +0000 |
commit | 910ddfb0a69780d141bc1b44c0e8d3aabb813532 (patch) | |
tree | 50506356169b7ae1988cdd7118b250cb5bae149a | |
parent | f5ff2046c1dd770af53f5817ae814fe5afa0b321 (diff) | |
download | eclipse.jdt.core-910ddfb0a69780d141bc1b44c0e8d3aabb813532.tar.gz eclipse.jdt.core-910ddfb0a69780d141bc1b44c0e8d3aabb813532.tar.xz eclipse.jdt.core-910ddfb0a69780d141bc1b44c0e8d3aabb813532.zip |
Bug 428275 - [1.8][compiler] CCE in InferenceContext18.varArgTypes
- more safety
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java index 256bd7aee2..bca540a401 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext18.java @@ -485,8 +485,9 @@ public class InferenceContext18 { MethodBinding innerMethod = invocation.binding(null); if (innerMethod instanceof ParameterizedGenericMethodBinding) { InferenceContext18 innerCtx = invocation.getInferenceContext((ParameterizedMethodBinding) innerMethod); - int innerKind = innerCtx != null ? innerCtx.inferenceKind : this.inferenceKind; - return addConstraintsToC(invocation.arguments(), c, innerMethod.genericMethod(), innerKind); + if (innerCtx != null) { // otherwise innerMethod does not participate in inference + return addConstraintsToC(invocation.arguments(), c, innerMethod.genericMethod(), innerCtx.inferenceKind); + } } } else if (expri instanceof ConditionalExpression) { ConditionalExpression ce = (ConditionalExpression) expri; |