From 2611e6bf9830e4971dcae3abedfede59f3cc86a5 Mon Sep 17 00:00:00 2001 From: Bulgakov Alexander Date: Fri, 3 May 2019 22:07:43 +0300 Subject: Revert "[val] in ecj we were constructing a different type than for javac, when using ‘val’ on an intersection type." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 1730a991 --- src/eclipseAgent/lombok/eclipse/agent/PatchVal.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/eclipseAgent/lombok/eclipse/agent/PatchVal.java') diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java index b32c99cd..12f4ad3d 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java @@ -263,15 +263,11 @@ public class PatchVal { resolved = null; } if (resolved != null) { - 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. - } + try { + replacement = makeType(resolved, local.type, false); + if (!decomponent) init.resolvedType = replacement.resolveType(scope); + } catch (Exception e) { + // Some type thing failed. } } } -- cgit