Skip to content

Commit

Permalink
Remove a few redundant implemented interfaces from J LST types
Browse files Browse the repository at this point in the history
While these implemented interfaces don't cause any trouble, they lead to problems when translated one-to-one to Python:

```
E   TypeError: Cannot create a consistent method resolution
E   order (MRO) for bases J, Expression, TypedTree, MethodCall
```
  • Loading branch information
knutwannheden committed Aug 23, 2024
1 parent a87527a commit 1b487f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rewrite-java/src/main/java/org/openrewrite/java/tree/J.java
Original file line number Diff line number Diff line change
Expand Up @@ -3360,7 +3360,7 @@ public String toString() {
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = true)
@RequiredArgsConstructor
@AllArgsConstructor(access = AccessLevel.PRIVATE)
final class MemberReference implements J, Expression, TypedTree, MethodCall {
final class MemberReference implements J, TypedTree, MethodCall {
@Nullable
@NonFinal
transient WeakReference<Padding> padding;
Expand Down Expand Up @@ -3804,7 +3804,7 @@ public MethodDeclaration withName(IdentifierWithAnnotations name) {
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = true)
@RequiredArgsConstructor
@AllArgsConstructor(access = AccessLevel.PRIVATE)
final class MethodInvocation implements J, Statement, Expression, TypedTree, MethodCall {
final class MethodInvocation implements J, Statement, TypedTree, MethodCall {
@Nullable
@NonFinal
transient WeakReference<Padding> padding;
Expand Down Expand Up @@ -4311,7 +4311,7 @@ public ArrayDimension withIndex(JRightPadded<Expression> index) {
@EqualsAndHashCode(callSuper = false, onlyExplicitlyIncluded = true)
@RequiredArgsConstructor
@AllArgsConstructor(access = AccessLevel.PRIVATE)
final class NewClass implements J, Statement, Expression, TypedTree, MethodCall {
final class NewClass implements J, Statement, TypedTree, MethodCall {
@Nullable
@NonFinal
transient WeakReference<Padding> padding;
Expand Down

0 comments on commit 1b487f5

Please sign in to comment.