Extraction Engine: Properly retrieve declaration for overriden/delegated Java synthetic properties

#KT-9554 Fixed
This commit is contained in:
Alexey Sedunov
2015-10-16 18:58:33 +03:00
parent 84aa4e7664
commit bdd495460b
8 changed files with 71 additions and 7 deletions
@@ -0,0 +1,6 @@
import org.jetbrains.annotations.NotNull;
interface Named {
@NotNull
String getName();
}
@@ -0,0 +1,11 @@
// WITH_RUNTIME
// PARAM_DESCRIPTOR: private final fun NamedEx.foo(): [@org.jetbrains.annotations.NotNull] String defined in Test
// PARAM_TYPES: NamedEx
// SIBLING:
public class Test {
private fun NamedEx.foo() = <selection>name</selection>
}
public class NamedEx : Named by object : Named {
override fun getName(): String = "foo"
}
@@ -0,0 +1,13 @@
// WITH_RUNTIME
// PARAM_DESCRIPTOR: private final fun NamedEx.foo(): [@org.jetbrains.annotations.NotNull] String defined in Test
// PARAM_TYPES: NamedEx
// SIBLING:
public class Test {
private fun NamedEx.foo() = s()
}
private fun NamedEx.s() = name
public class NamedEx : Named by object : Named {
override fun getName(): String = "foo"
}
@@ -0,0 +1,10 @@
import org.jetbrains.annotations.NotNull;
interface Named {
@NotNull
String getName();
}
interface NamedEx extends Named {
}
@@ -0,0 +1,7 @@
// WITH_RUNTIME
// PARAM_DESCRIPTOR: private final fun NamedEx.foo(): [@org.jetbrains.annotations.NotNull] String defined in Test
// PARAM_TYPES: NamedEx
// SIBLING:
public class Test {
private fun NamedEx.foo() = <selection>name</selection>
}
@@ -0,0 +1,9 @@
// WITH_RUNTIME
// PARAM_DESCRIPTOR: private final fun NamedEx.foo(): [@org.jetbrains.annotations.NotNull] String defined in Test
// PARAM_TYPES: NamedEx
// SIBLING:
public class Test {
private fun NamedEx.foo() = s()
}
private fun NamedEx.s() = name