Override/Implement Members: Implement Members: Fix base member detection when abstract and non-abstract members with matching signatures are inherited from an interface

#KT-11115 Fixed
(cherry picked from commit a3a2e57)
This commit is contained in:
Alexey Sedunov
2016-06-24 18:08:58 +03:00
parent dd7bd2b869
commit a33f946c14
5 changed files with 37 additions and 1 deletions
+6
View File
@@ -113,6 +113,12 @@ These artifacts include extensions for the types available in the latter JDKs, s
- [`KT-13037`](https://youtrack.jetbrains.com/issue/KT-13037) Fix possible deadlock in debugger in 2016.1 and exception in 2016.2
- [`KT-12651`](https://youtrack.jetbrains.com/issue/KT-12651) Fix exception in evaluate expression when bad identifier is used for marking object
#### Intention actions, inspections and quickfixes
###### Issues fixed
- [`KT-11115`](https://youtrack.jetbrains.com/issue/KT-11115) Implement Members: Fix base member detection when abstract and non-abstract members with matching signatures are inherited from an interface
#### Refactorings
###### Issues fixed
@@ -334,7 +334,9 @@ public class OverrideResolver {
@Override
public void conflictingInterfaceMemberNotImplemented(CallableMemberDescriptor descriptor) {
// don't care
if (descriptor.getModality() == Modality.ABSTRACT) {
shouldImplement.add(descriptor);
}
}
@Override
@@ -0,0 +1,11 @@
interface T {
fun getFoo(): String = ""
}
interface U {
fun getFoo(): String
}
class C1 : T, U {
<caret>
}
@@ -0,0 +1,13 @@
interface T {
fun getFoo(): String = ""
}
interface U {
fun getFoo(): String
}
class C1 : T, U {
override fun getFoo(): String {
<selection><caret>TODO("not implemented") //To change body of created functions use File | Settings | File Templates.</selection>
}
}
@@ -247,4 +247,8 @@ class OverrideImplementTest : AbstractOverrideImplementTest() {
fun testPlatformTypes() {
doOverrideDirectoryTest("foo")
}
fun testAbstractAndNonAbstractInheritedFromInterface() {
doImplementFileTest("getFoo")
}
}