diff options
author | Stephan Herrmann | 2019-07-23 17:07:45 +0000 |
---|---|---|
committer | Stephan Herrmann | 2019-07-24 07:55:47 +0000 |
commit | 9a9e397521055c943a0ead8b88f6fcb21b4f4b9e (patch) | |
tree | 574d2d0d715735859b5cb52d5b6226b726e13587 | |
parent | fcf2ea3ee3babc632c8b89d189855cc579edd175 (diff) | |
download | eclipse.jdt.core-9a9e397521055c943a0ead8b88f6fcb21b4f4b9e.tar.gz eclipse.jdt.core-9a9e397521055c943a0ead8b88f6fcb21b4f4b9e.tar.xz eclipse.jdt.core-9a9e397521055c943a0ead8b88f6fcb21b4f4b9e.zip |
Bug 549024 - [1.8][impl] inconsistent array typing inI20190724-1800
BoundSet.ThreeSets.upperBounds(boolean, InferenceVariable)
Change-Id: Ib0613df6e27af9baaf22db270491e6a6392a1ad7
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java index 2db7c5a71e..78cff89fd4 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java @@ -102,7 +102,7 @@ class BoundSet { } // pre: this.subBounds != null public TypeBinding[] upperBounds(boolean onlyProper, InferenceVariable variable) { - ReferenceBinding[] rights = new ReferenceBinding[this.subBounds.size()]; + TypeBinding[] rights = new TypeBinding[this.subBounds.size()]; TypeBinding simpleUpper = null; Iterator<TypeBound> it = this.subBounds.iterator(); long nullHints = variable.nullHints; @@ -111,7 +111,7 @@ class BoundSet { TypeBinding right=it.next().right; if (!onlyProper || right.isProperType(true)) { if (right instanceof ReferenceBinding) { - rights[i++] = (ReferenceBinding) right; + rights[i++] = right; nullHints |= right.tagBits & TagBits.AnnotationNullMASK; } else { if (simpleUpper != null) @@ -125,7 +125,7 @@ class BoundSet { if (i == 1 && simpleUpper != null) return new TypeBinding[] { simpleUpper }; // no nullHints since not a reference type if (i < rights.length) - System.arraycopy(rights, 0, rights=new ReferenceBinding[i], 0, i); + System.arraycopy(rights, 0, rights=new TypeBinding[i], 0, i); useNullHints(nullHints, rights, variable.environment); InferenceContext18.sortTypes(rights); return rights; |