Skip to content

Commit

Permalink
[java-decompiler] IJ-CR-118414 IDEA-326015 Support instanceOf decons…
Browse files Browse the repository at this point in the history
…truction

GitOrigin-RevId: 863d4cb5ba61a43b8dfc91bd3b4788c5c8d5d01e
  • Loading branch information
Mikhail Pyltsin authored and intellij-monorepo-bot committed Nov 7, 2023
1 parent 8a83115 commit d386bfd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public static void replaceAssignmentsWithPatternVariables(@NotNull RootStatement
removeTempVariableDeclarations(tempVarAssignments);
}

/**
* Replaces assignments with pattern variables in the provided statement.
*
* @return a list of Runnable objects containing the actions to replace assignments with pattern variables
*/
private static List<Runnable> replaceAssignmentsWithPatternVariables(@NotNull Statement statement,
@NotNull List<TempVarAssignmentItem> tempVarAssignments,
boolean recordPatternSupport,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ public RecordVarExprent copy() {
}

/**
* @return a copy of the current RecordVarExprent object, including a copy of its VarExprent superclass, excluding components
* Copies the values from the provided VarExprent object to the current RecordVarExprent object.
* If the provided VarExprent object is an instance of RecordVarExprent, copies the components from it.
* Otherwise, copy the varType, index, and version from the provided VarExprent object.
*
* @param varExprent the VarExprent object to copy the values from
* @return true if the copying is successful (the current set of components is empty), false otherwise
*/

public boolean copyFrom(@NotNull VarExprent varExprent) {
if (varExprent instanceof RecordVarExprent recordVarExprent) {
if (!this.components.isEmpty()) {
Expand Down

0 comments on commit d386bfd

Please sign in to comment.