diff options
author | Stephan Herrmann | 2014-02-07 21:10:11 +0000 |
---|---|---|
committer | Stephan Herrmann | 2014-02-08 12:28:46 +0000 |
commit | a0827b5ed51f9fc68d50a6070897f74217550da1 (patch) | |
tree | 5010999e4482f62a42deacb5d414aad586f37251 | |
parent | c26ed9010f086cee334676f08e3ce032d3a02c30 (diff) | |
download | eclipse.jdt.core-a0827b5ed51f9fc68d50a6070897f74217550da1.tar.gz eclipse.jdt.core-a0827b5ed51f9fc68d50a6070897f74217550da1.tar.xz eclipse.jdt.core-a0827b5ed51f9fc68d50a6070897f74217550da1.zip |
Bug 427165 - [1.8][inference] reduce [alpha <: null] in analogy to [null
<: alpha]
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java index 686dcc60f6..30e91b7e6d 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java @@ -202,6 +202,8 @@ class ConstraintTypeFormula extends ConstraintFormula { } if (subCandidate.id == TypeIds.T_null) return TRUE; + if (superCandidate.id == TypeIds.T_null) + return FALSE; if (subCandidate instanceof InferenceVariable) return new TypeBound((InferenceVariable)subCandidate, superCandidate, SUBTYPE, this.isSoft); if (superCandidate instanceof InferenceVariable) @@ -285,8 +287,6 @@ class ConstraintTypeFormula extends ConstraintFormula { case Binding.INTERSECTION_TYPE: InferenceContext18.missingImplementation("NYI"); //$NON-NLS-1$ } - if (superCandidate.id == TypeIds.T_null) - return FALSE; throw new IllegalStateException("Unexpected RHS "+superCandidate); //$NON-NLS-1$ } |