Closed 123a6bcw closed 4 years ago
Please consider this file https://github.com/JetBrains-Research/IntelliJDeodorant/blob/god-class-apply-refactoring-merge/src/test/resources/testdata/ide/refactoring/godclass/TestSimple/initial/Test.java
And the results I got from your plugin https://github.com/JetBrains-Research/IntelliJDeodorant/blob/god-class-apply-refactoring-merge/src/test/resources/testdata/ide/refactoring/godclass/TestSimple/expected/TestProduct.java
This will give a compilation error Cannot reference a field before it is defined because field SIZE initializes after array. The possible solution is to extract the source class fields to the product class in the same order as in the source class.
Cannot reference a field before it is defined
SIZE
array
Please consider this file https://github.com/JetBrains-Research/IntelliJDeodorant/blob/god-class-apply-refactoring-merge/src/test/resources/testdata/ide/refactoring/godclass/TestSimple/initial/Test.java
And the results I got from your plugin https://github.com/JetBrains-Research/IntelliJDeodorant/blob/god-class-apply-refactoring-merge/src/test/resources/testdata/ide/refactoring/godclass/TestSimple/expected/TestProduct.java
This will give a compilation error
Cannot reference a field before it is defined
because fieldSIZE
initializes afterarray
. The possible solution is to extract the source class fields to the product class in the same order as in the source class.