From aa08209a18e2e2ee4cb2b8687e9ce5791a36161d Mon Sep 17 00:00:00 2001 From: Yigit Boyar Date: Mon, 12 Oct 2020 13:09:53 -0700 Subject: [PATCH] repro case for override check failure --- .../google/devtools/ksp/processor/CheckOverrideProcessor.kt | 3 +++ compiler-plugin/testData/api/checkOverride.kt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/processor/CheckOverrideProcessor.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/processor/CheckOverrideProcessor.kt index 4d0386e76e..d3e6aa3390 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/processor/CheckOverrideProcessor.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/processor/CheckOverrideProcessor.kt @@ -69,5 +69,8 @@ class CheckOverrideProcessor : AbstractTestProcessor() { checkOverride(getY, myInterfaceX) checkOverride(getX, myInterfaceX) checkOverride(setY, myInterfaceY) + checkOverride(myInterfaceX, getY) + checkOverride(myInterfaceX, getX) + checkOverride(myInterfaceY, setY) } } \ No newline at end of file diff --git a/compiler-plugin/testData/api/checkOverride.kt b/compiler-plugin/testData/api/checkOverride.kt index 0ab4e8df51..740d26c46b 100644 --- a/compiler-plugin/testData/api/checkOverride.kt +++ b/compiler-plugin/testData/api/checkOverride.kt @@ -29,6 +29,9 @@ // JavaImpl.getY overrides MyInterface.x: false // JavaImpl.getX overrides MyInterface.x: true // JavaImpl.setY overrides MyInterface.y: true +// MyInterface.x overrides JavaImpl.getY: false +// MyInterface.x overrides JavaImpl.getX: false +// MyInterface.y overrides JavaImpl.setY: false // END // FILE: a.kt