aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers
diff options
context:
space:
mode:
authorBulgakov Alexander <buls@yandex.ru>2019-04-24 14:06:15 +0300
committerBulgakov Alexander <buls@yandex.ru>2019-04-24 14:06:15 +0300
commitf0343886a331f3cb2175545a062f3736610f9179 (patch)
treec4699c4be71abc13d6185ffe21f363f18dff6267 /src/core/lombok/eclipse/handlers
parent69e6932b81f9e6e17da3097ac6e576a261d3e4c1 (diff)
downloadlombok-f0343886a331f3cb2175545a062f3736610f9179.tar.gz
lombok-f0343886a331f3cb2175545a062f3736610f9179.tar.bz2
lombok-f0343886a331f3cb2175545a062f3736610f9179.zip
improvements type inference of type intersections (affects ValLambda.java, ValWeirdTypes.java tests)
Diffstat (limited to 'src/core/lombok/eclipse/handlers')
-rw-r--r--src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
index 010dc9d8..438314ca 100644
--- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
+++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
@@ -893,7 +893,12 @@ public class EclipseHandlerUtil {
WildcardBinding wildcard = (WildcardBinding) binding;
if (wildcard.boundKind == Wildcard.EXTENDS) {
if (!allowCompound) {
- return makeType(wildcard.bound, pos, false);
+ TypeBinding bound = wildcard.bound;
+ boolean isObject = bound.id == TypeIds.T_JavaLangObject;
+ TypeBinding[] otherBounds = wildcard.otherBounds;
+ if (isObject && otherBounds != null && otherBounds.length > 0) {
+ return makeType(otherBounds[0], pos, false);
+ } else return makeType(bound, pos, false);
} else {
Wildcard out = new Wildcard(Wildcard.EXTENDS);
setGeneratedBy(out, pos);