aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorJonas Herzig <jonas@spark-squared.com>2021-11-11 16:52:27 +0100
committerJonas Herzig <jonas@spark-squared.com>2021-11-11 21:38:47 +0100
commit982982c63027e416bd78ca40708c7238e7eed26b (patch)
tree509517275b8664157f0cfc58e20675527fcc9ce8 /src/test/java
parentb4462eb6030f8e5a072ad4b6508d7a93d574522f (diff)
downloadRemap-982982c63027e416bd78ca40708c7238e7eed26b.tar.gz
Remap-982982c63027e416bd78ca40708c7238e7eed26b.tar.bz2
Remap-982982c63027e416bd78ca40708c7238e7eed26b.zip
Fix remapping of qualified inner class reference in Kotlin code
When we used to remap `a.pkg.A.Inner` we would apply both mappings (the one for the inner class and the one for the outer class) at the same time, resulting in `b.pkg.B.Inner.Inner`. The direct cause being that we only checked conflicts for the range of the respective expression (which is just `A` and `Inner` for Kotlin, and therefore not conflicting) instead of the parent as we should have. With that fixed, it now also becomes apparent that we need to apply mappings for dot qualified expressions back to front (otherwise the outer class takes priority), so that is the second thing this commit change.
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/a/pkg/A.java5
-rw-r--r--src/test/java/b/pkg/B.java5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/test/java/a/pkg/A.java b/src/test/java/a/pkg/A.java
index ff779b2..94e8a77 100644
--- a/src/test/java/a/pkg/A.java
+++ b/src/test/java/a/pkg/A.java
@@ -42,4 +42,9 @@ public class A extends AParent implements AInterface {
public class Inner {
private int aField;
}
+
+ public class InnerA {
+ }
+
+ public class GenericA<T> {}
}
diff --git a/src/test/java/b/pkg/B.java b/src/test/java/b/pkg/B.java
index 6ed26c1..9524513 100644
--- a/src/test/java/b/pkg/B.java
+++ b/src/test/java/b/pkg/B.java
@@ -42,4 +42,9 @@ public class B extends BParent implements BInterface {
public class Inner {
private int bField;
}
+
+ public class InnerB {
+ }
+
+ public class GenericB<T> {}
}