Skip to content

Commit

Permalink
Update src/main/java/org/openrewrite/kotlin/tree/K.java
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Snyder <[email protected]>
  • Loading branch information
kunli2 and sambsnyd authored Apr 14, 2023
1 parent 3b18f9a commit 1b3b8dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/openrewrite/kotlin/tree/K.java
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,10 @@ public <J2 extends Tree> J2 withMarkers(Markers markers) {

@Override
public <J2 extends J> J2 withType(@Nullable JavaType type) {
if (typedTree instanceof J.NewClass) {
return (J2) this;
if (typedTree instanceof FunctionType) {
return (J2) withTypedTree(typedTree.withType(type));
}
return (J2) withTypedTree(typedTree.withType(type));
return (J2) this;
}

@Override
Expand Down

0 comments on commit 1b3b8dc

Please sign in to comment.