Add tests for KT-20824, KT-23745, KT-23124, KT-20605, KT-23760
#KT-20824 Fixed #KT-23745 Fixed #KT-23124 Fixed #KT-20605 Fixed #KT-23760 Fixed
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
// KT-23745
|
||||
expect interface A
|
||||
expect interface B
|
||||
|
||||
interface Both : A, B
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
actual interface A
|
||||
actual interface B {
|
||||
fun z()
|
||||
fun x()
|
||||
}
|
||||
|
||||
<error descr="[ABSTRACT_MEMBER_NOT_IMPLEMENTED] Class 'Impl' is not abstract and does not implement abstract member public abstract fun x(): Unit defined in Both">class Impl</error> : Both {
|
||||
override fun z() {
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// KT-23124
|
||||
package com.example
|
||||
|
||||
expect class Decimal
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.example.bar
|
||||
|
||||
import com.example.Decimal
|
||||
|
||||
class Foo(
|
||||
val bar: Decimal
|
||||
)
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package com.example
|
||||
|
||||
actual typealias Decimal = Double
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package com.example
|
||||
|
||||
import com.example.bar.Foo
|
||||
|
||||
val a = Foo(0.toDouble())
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package com.example
|
||||
|
||||
import java.math.BigDecimal
|
||||
|
||||
actual typealias Decimal = BigDecimal
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package com.example
|
||||
|
||||
import com.example.bar.Foo
|
||||
import java.math.BigDecimal
|
||||
|
||||
val a = Foo(BigDecimal(1))
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// KT-23760
|
||||
package foo
|
||||
|
||||
expect interface Upper
|
||||
|
||||
expect interface BaseI {
|
||||
fun f(p: Upper)
|
||||
}
|
||||
|
||||
interface I : BaseI
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package foo
|
||||
|
||||
interface X
|
||||
actual typealias Upper = X
|
||||
|
||||
actual interface BaseI {
|
||||
actual fun f(p: Upper)
|
||||
}
|
||||
|
||||
internal class Impl : I {
|
||||
override fun f(p: Upper) {
|
||||
}
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// KT-20824
|
||||
package foo
|
||||
|
||||
fun <O : Appendable> O.appendMe(): O = this // kotlin.text.Appendable
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package foo
|
||||
|
||||
fun tryIt() {
|
||||
buildString { // kotlin.text.StringBuilder = java.lang.StringBuilder
|
||||
appendMe()
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// KT-20605
|
||||
package foo
|
||||
|
||||
expect class C {
|
||||
}
|
||||
|
||||
fun getC(): C? = null
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package foo
|
||||
|
||||
actual class C {
|
||||
fun zzz() {
|
||||
}
|
||||
}
|
||||
|
||||
fun works() {
|
||||
C().zzz()
|
||||
}
|
||||
|
||||
fun doesnNot() {
|
||||
getC()?.zzz()
|
||||
getC()?.zzz()
|
||||
}
|
||||
Generated
+25
@@ -25,6 +25,11 @@ public class MultiModuleHighlightingTestGenerated extends AbstractMultiModuleHig
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("additionalMembersInPlatformInterface")
|
||||
public void testAdditionalMembersInPlatformInterface() throws Exception {
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/additionalMembersInPlatformInterface/");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInMultiplatform() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/multiModuleHighlighting/multiplatform"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false);
|
||||
}
|
||||
@@ -84,6 +89,11 @@ public class MultiModuleHighlightingTestGenerated extends AbstractMultiModuleHig
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/nestedClassWithoutImpl/");
|
||||
}
|
||||
|
||||
@TestMetadata("platformTypeAliasInterchangebleWithAliasedClass")
|
||||
public void testPlatformTypeAliasInterchangebleWithAliasedClass() throws Exception {
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/platformTypeAliasInterchangebleWithAliasedClass/");
|
||||
}
|
||||
|
||||
@TestMetadata("suppressHeaderWithoutImpl")
|
||||
public void testSuppressHeaderWithoutImpl() throws Exception {
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/suppressHeaderWithoutImpl/");
|
||||
@@ -104,11 +114,26 @@ public class MultiModuleHighlightingTestGenerated extends AbstractMultiModuleHig
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/triangleWithDependency/");
|
||||
}
|
||||
|
||||
@TestMetadata("typeAliasedParameter")
|
||||
public void testTypeAliasedParameter() throws Exception {
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/typeAliasedParameter/");
|
||||
}
|
||||
|
||||
@TestMetadata("useAppendable")
|
||||
public void testUseAppendable() throws Exception {
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/useAppendable/");
|
||||
}
|
||||
|
||||
@TestMetadata("useCorrectBuiltInsForCommonModule")
|
||||
public void testUseCorrectBuiltInsForCommonModule() throws Exception {
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/useCorrectBuiltInsForCommonModule/");
|
||||
}
|
||||
|
||||
@TestMetadata("usePlatformSpecificMember")
|
||||
public void testUsePlatformSpecificMember() throws Exception {
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/usePlatformSpecificMember/");
|
||||
}
|
||||
|
||||
@TestMetadata("withOverrides")
|
||||
public void testWithOverrides() throws Exception {
|
||||
runTest("idea/testData/multiModuleHighlighting/multiplatform/withOverrides/");
|
||||
|
||||
Reference in New Issue
Block a user