diff options
author | Bulgakov Alexander <buls@yandex.ru> | 2019-04-25 23:35:01 +0300 |
---|---|---|
committer | Bulgakov Alexander <buls@yandex.ru> | 2019-04-25 23:35:01 +0300 |
commit | afe9e374975c85a87fdf6c0d45171ac44f616a37 (patch) | |
tree | d49b9f905a564729d5cdefa2f9626266b0b541f0 /src/eclipseAgent/lombok/eclipse/agent/PatchVal.java | |
parent | f0343886a331f3cb2175545a062f3736610f9179 (diff) | |
parent | 150be0a186d880503cb23d056ea4cf229ebc37e5 (diff) | |
download | lombok-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.java | 14 |
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. + } } } } |