From 7c44db1ef0075e2b80a4723e0747bbf57c32e775 Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak <32793002+BarkingBad@users.noreply.github.com> Date: Thu, 27 Jan 2022 10:39:56 +0100 Subject: Fix resolving DRIs of Enum Entries (#2305) * Fix resolving DRIs of Enum Entries * Unify DRIs for Kotlin and Java enums. Add EnumEntry linking tests * Updates EnumEntry extras in documentable translators * Fix tests * Apply requested changes * Apply requested changes --- .../resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java | 5 +++++ .../linking/jvmMain/kotlin/linking/source/JavaLinker.java | 8 ++++++++ .../resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt | 5 +++++ .../linking/jvmMain/kotlin/linking/source/KotlinLinker.kt | 8 ++++++++ 4 files changed, 26 insertions(+) create mode 100644 plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java create mode 100644 plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java create mode 100644 plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt create mode 100644 plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt (limited to 'plugins/base/src/test/resources/linking/jvmMain') diff --git a/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java b/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java new file mode 100644 index 00000000..016365a7 --- /dev/null +++ b/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaEnum.java @@ -0,0 +1,5 @@ +package linking.source; + +public enum JavaEnum { + ON_DECEIT, ON_DESTROY; +} diff --git a/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java b/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java new file mode 100644 index 00000000..ac416530 --- /dev/null +++ b/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/JavaLinker.java @@ -0,0 +1,8 @@ +package linking.source; + +/** + * Reference link {@link linking.source.KotlinEnum} should resolve
+ * sjuff sjuff {@link linking.source.KotlinEnum#ON_CREATE} should resolve
+ * sjujj sjujj {@link linking.source.JavaEnum#ON_DECEIT} should resolve + */ +public class JavaLinker {} diff --git a/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt b/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt new file mode 100644 index 00000000..a03316b1 --- /dev/null +++ b/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinEnum.kt @@ -0,0 +1,5 @@ +package linking.source + +enum class KotlinEnum { + ON_CREATE, ON_CATASTROPHE +} diff --git a/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt b/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt new file mode 100644 index 00000000..45afc3d5 --- /dev/null +++ b/plugins/base/src/test/resources/linking/jvmMain/kotlin/linking/source/KotlinLinker.kt @@ -0,0 +1,8 @@ +package linking.source + +/** + * Reference link [KotlinEnum] should resolve
+ * stuff stuff [KotlinEnum.ON_CREATE] should resolve
+ * stuff stuff [JavaEnum.ON_DECEIT] should resolve + */ +class KotlinLinker {} -- cgit