add test which reproduces the problem
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
open class Foo<T>() {
|
||||
/**
|
||||
* Doc for method xyzzy
|
||||
*/
|
||||
open fun xyzzy(): Int = 0
|
||||
}
|
||||
|
||||
open class Bar(): Foo<String>() {
|
||||
override fun xyzzy(): Int = 1
|
||||
}
|
||||
@@ -46,4 +46,13 @@ public class KDocFinderTest() : LightPlatformCodeInsightFixtureTestCase() {
|
||||
val doc = KDocFinder.findKDoc(overriddenFunctionDescriptor)
|
||||
Assert.assertEquals("Doc for method xyzzy", doc!!.getContent())
|
||||
}
|
||||
|
||||
public fun testOverriddenWithSubstitutedType() {
|
||||
myFixture.configureByFile(getTestName(false) + ".kt")
|
||||
val declaration = (myFixture.getFile() as JetFile).getDeclarations().single { it.getName() == "Bar" }
|
||||
val descriptor = declaration.resolveToDescriptor() as ClassDescriptor
|
||||
val overriddenFunctionDescriptor = descriptor.getDefaultType().getMemberScope().getFunctions(Name.identifier("xyzzy")).single()
|
||||
val doc = KDocFinder.findKDoc(overriddenFunctionDescriptor)
|
||||
Assert.assertEquals("Doc for method xyzzy", doc!!.getContent())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user