Add test on KT-44898 (MPP + type refinement + complex inheritance)

The current behaviour is undesired (ABSTRACT_MEMEBER_NOT_IMPLEMENTED
reported on class Concrete), will be fixed in the next commit
This commit is contained in:
Dmitry Savvinov
2021-02-25 17:47:13 +03:00
parent e3d4c440b5
commit 9616eb94fd
6 changed files with 31 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
package sample
public abstract class <!LINE_MARKER("descr='Is subclassed by Concrete'")!>Base<!> : I {
override suspend fun <A : Appendable> <!LINE_MARKER("descr='Implements function in 'I''")!>readUTF8LineTo<!>(out: A, limit: Int): Boolean {
TODO("Not yet implemented")
}
}
+5
View File
@@ -0,0 +1,5 @@
package sample
public expect interface <!LINE_MARKER("descr='Is subclassed by Base Concrete'"), LINE_MARKER("descr='Has actuals in JVM'")!>I<!> {
public suspend fun <A : Appendable> <!LINE_MARKER("descr='Has actuals in JVM'"), LINE_MARKER("descr='Is overridden in sample.Base'")!>readUTF8LineTo<!>(out: A, limit: Int): Boolean
}
+6
View File
@@ -0,0 +1,6 @@
MODULE common { platform=[JVM, JS, Native]; root=common }
MODULE jvm { platform=[JVM]; root=jvm }
common -> STDLIB_COMMON { kind=DEPENDENCY }
jvm -> common { kind=DEPENDS_ON }
jvm -> STDLIB_JVM { kind=DEPENDENCY }
+3
View File
@@ -0,0 +1,3 @@
package sample
public <!ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED!>class Concrete<!> : Base()
+5
View File
@@ -0,0 +1,5 @@
package sample
public actual interface <!LINE_MARKER("descr='Has declaration in common module'")!>I<!> {
public actual suspend fun <A : <!FINAL_UPPER_BOUND!>Appendable<!>> <!LINE_MARKER("descr='Has declaration in common module'")!>readUTF8LineTo<!>(out: A, limit: Int): Boolean
}
@@ -169,6 +169,11 @@ public class MultiplatformAnalysisTestGenerated extends AbstractMultiplatformAna
runTest("idea/testData/multiplatform/kt41218/");
}
@TestMetadata("kt44898")
public void testKt44898() throws Exception {
runTest("idea/testData/multiplatform/kt44898/");
}
@TestMetadata("lambdas")
public void testLambdas() throws Exception {
runTest("idea/testData/multiplatform/lambdas/");