Revert "[val] in ecj we were constructing a different type than for javac, when using ‘val’ on an intersection type."

This reverts commit 1730a991
This commit is contained in:
Bulgakov Alexander committed 2019-05-03 22:07:43 +03:00
1 parent 715c731fc2
commit 2611e6bf98
1 file changed
+5 -9
@@ -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.
}
}
}