aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java
diff options
context:
space:
mode:
authorBulgakov Alexander <buls@yandex.ru>2019-04-25 23:35:01 +0300
committerBulgakov Alexander <buls@yandex.ru>2019-04-25 23:35:01 +0300
commitafe9e374975c85a87fdf6c0d45171ac44f616a37 (patch)
treed49b9f905a564729d5cdefa2f9626266b0b541f0 /src/eclipseAgent/lombok/eclipse/agent/PatchVal.java
parentf0343886a331f3cb2175545a062f3736610f9179 (diff)
parent150be0a186d880503cb23d056ea4cf229ebc37e5 (diff)
downloadlombok-afe9e374975c85a87fdf6c0d45171ac44f616a37.tar.gz
lombok-afe9e374975c85a87fdf6c0d45171ac44f616a37.tar.bz2
lombok-afe9e374975c85a87fdf6c0d45171ac44f616a37.zip
Merge branch 'master' into feature/typeInferenceImprovements
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/PatchVal.java')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/PatchVal.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java
index 12f4ad3d..b32c99cd 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java
@@ -263,11 +263,15 @@ public class PatchVal {
resolved = null;
}
if (resolved != null) {
- try {
- replacement = makeType(resolved, local.type, false);
- if (!decomponent) init.resolvedType = replacement.resolveType(scope);
- } catch (Exception e) {
- // Some type thing failed.
+ if (resolved.getClass().getSimpleName().startsWith("IntersectionTypeBinding")) {
+ // We intentionally deconstruct these into simply 'Object', because picking an arbitrary type amongst the intersection feels worse.
+ } else {
+ try {
+ replacement = makeType(resolved, local.type, false);
+ if (!decomponent) init.resolvedType = replacement.resolveType(scope);
+ } catch (Exception e) {
+ // Some type thing failed.
+ }
}
}
}