[kotlin] K2 J2K: Move VarToValProcessing LocalVarToValInspectionBasedProcessing and fixValToVarDiagnosticBasedProcessing to JKTree #2743
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(continuation of #2702 and #2726)
@darthorimar requested that I move the process of determining mutability earlier as it will be faster in the psi/java side of things. However, after completing it in this pull request I feel like this is actually impossible. There are many such cases where the code changes after the
JKBuilder
phase that would change mutability. For example:s1
ands2
are initially stub expressions and are only defined once in the class. This would indicate that they can beval
. However, bykt-19340.kt
,s1
ands2
are set equal to null initially, and thus have their values changed. There are many more such instances of this.additionally, per slack discussion we have noted that
nameConflict4
andnameConflict5
should be in a run block. However, the j2k is not creating these run blocks, hence those tests failing here.Thanks in advance for any feedback!
@abelkov @darthorimar @ermattt