Merge together MultiplatformHighlighting and MultiplatformAnalysis tests
Basically, the former uses an old quickly-scrapped infrastructure, which were not applicable for HMPP, so the latter tests were written. So, both check for one and the same thing (highlighting in MPP projects), but MultiplatformAnalysisTest is more modern, and has a lot of inconvenient stuff in MultiplatformHighlighting fixed ^KT-43116 Fixed
This commit is contained in:
Generated
+1
@@ -32,5 +32,6 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/kotlin-ultimate" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.gradle
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase
|
|
||||||
import org.jetbrains.kotlin.idea.codeInsight.gradle.mppImportTestMinVersionForMaster
|
|
||||||
import org.jetbrains.plugins.gradle.tooling.annotation.PluginTargetVersions
|
|
||||||
import org.junit.Test
|
|
||||||
|
|
||||||
|
|
||||||
class ImportAndCheckHighlighting : MultiplePluginVersionGradleImportingTestCase() {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@PluginTargetVersions(pluginVersion = "1.3.40+", gradleVersionForLatestPlugin = mppImportTestMinVersionForMaster)
|
|
||||||
fun testMultiplatformLibrary() {
|
|
||||||
importAndCheckHighlighting()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@PluginTargetVersions(pluginVersion = "1.3.40+", gradleVersionForLatestPlugin = mppImportTestMinVersionForMaster)
|
|
||||||
fun testUnresolvedInMultiplatformLibrary() {
|
|
||||||
importAndCheckHighlighting(false, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun importAndCheckHighlighting(testLineMarkers: Boolean = true, checkWarnings: Boolean = true) {
|
|
||||||
val files = configureByFiles()
|
|
||||||
importProject(skipIndexing = false)
|
|
||||||
val project = myTestFixture.project
|
|
||||||
checkFiles(
|
|
||||||
files.filter { it.extension == "kt" || it.extension == "java" },
|
|
||||||
project,
|
|
||||||
object : GradleDaemonAnalyzerTestCase(
|
|
||||||
testLineMarkers = testLineMarkers,
|
|
||||||
checkWarnings = checkWarnings,
|
|
||||||
checkInfos = false,
|
|
||||||
rootDisposable = testRootDisposable
|
|
||||||
) {}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun testDataDirName(): String {
|
|
||||||
return "importAndCheckHighlighting"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-59
@@ -1,59 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'org.jetbrains.kotlin.multiplatform' version '{{kotlin_plugin_version}}'
|
|
||||||
}
|
|
||||||
repositories {
|
|
||||||
{{kotlin_plugin_repositories}}
|
|
||||||
}
|
|
||||||
group 'com.example'
|
|
||||||
version '0.0.1'
|
|
||||||
|
|
||||||
apply plugin: 'maven-publish'
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
jvm()
|
|
||||||
js {
|
|
||||||
browser {
|
|
||||||
}
|
|
||||||
nodejs {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
commonMain {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('stdlib-common')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
commonTest {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('test-common')
|
|
||||||
implementation kotlin('test-annotations-common')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jvmMain {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('stdlib-jdk8')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jvmTest {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('test')
|
|
||||||
implementation kotlin('test-junit')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jsMain {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('stdlib-js')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jsTest {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('test-js')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mingwMain {
|
|
||||||
}
|
|
||||||
mingwTest {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
kotlin.code.style=official
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
{{kotlin_plugin_repositories}}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rootProject.name = 'mppLibrary'
|
|
||||||
|
|
||||||
enableFeaturePreview('GRADLE_METADATA')
|
|
||||||
-11
@@ -1,11 +0,0 @@
|
|||||||
package sample
|
|
||||||
|
|
||||||
expect class <lineMarker descr="Has actuals in JS, JVM">Sample</lineMarker>() {
|
|
||||||
fun <lineMarker descr="Has actuals in JS, JVM">checkMe</lineMarker>(): Int
|
|
||||||
}
|
|
||||||
|
|
||||||
expect object <lineMarker descr="Has actuals in JS, JVM">Platform</lineMarker> {
|
|
||||||
val <lineMarker descr="Has actuals in JS, JVM">name</lineMarker>: String
|
|
||||||
}
|
|
||||||
|
|
||||||
fun hello(): String = "Hello from ${Platform.name}"
|
|
||||||
-11
@@ -1,11 +0,0 @@
|
|||||||
package sample
|
|
||||||
|
|
||||||
import kotlin.test.Test
|
|
||||||
import kotlin.test.assertTrue
|
|
||||||
|
|
||||||
class <lineMarker descr="Run Test">SampleTests</lineMarker> {
|
|
||||||
@Test
|
|
||||||
fun <lineMarker descr="Run Test">testMe</lineMarker>() {
|
|
||||||
assertTrue(Sample().checkMe() > 0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
package sample
|
|
||||||
|
|
||||||
actual class <lineMarker descr="Has declaration in common module">Sample</lineMarker> {
|
|
||||||
actual fun <lineMarker descr="Has declaration in common module">checkMe</lineMarker>() = 12
|
|
||||||
}
|
|
||||||
|
|
||||||
actual object <lineMarker descr="Has declaration in common module">Platform</lineMarker> {
|
|
||||||
actual val <lineMarker descr="Has declaration in common module">name</lineMarker>: String = "JS"
|
|
||||||
}
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
package sample
|
|
||||||
|
|
||||||
actual class <lineMarker descr="Has declaration in common module">Sample</lineMarker> {
|
|
||||||
actual fun <lineMarker descr="Has declaration in common module">checkMe</lineMarker>() = 42
|
|
||||||
}
|
|
||||||
|
|
||||||
actual object <lineMarker descr="Has declaration in common module">Platform</lineMarker> {
|
|
||||||
actual val <lineMarker descr="Has declaration in common module">name</lineMarker>: String = "JVM"
|
|
||||||
}
|
|
||||||
-11
@@ -1,11 +0,0 @@
|
|||||||
package sample
|
|
||||||
|
|
||||||
import kotlin.test.Test
|
|
||||||
import kotlin.test.assertTrue
|
|
||||||
|
|
||||||
class <lineMarker descr="Run Test">SampleTestsJVM</lineMarker> {
|
|
||||||
@Test
|
|
||||||
fun <lineMarker descr="Run Test">testHello</lineMarker>() {
|
|
||||||
assertTrue("JVM" in hello())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Vendored
-59
@@ -1,59 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'org.jetbrains.kotlin.multiplatform' version '{{kotlin_plugin_version}}'
|
|
||||||
}
|
|
||||||
repositories {
|
|
||||||
{{kotlin_plugin_repositories}}
|
|
||||||
}
|
|
||||||
group 'com.example'
|
|
||||||
version '0.0.1'
|
|
||||||
|
|
||||||
apply plugin: 'maven-publish'
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
jvm()
|
|
||||||
js {
|
|
||||||
browser {
|
|
||||||
}
|
|
||||||
nodejs {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
commonMain {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('stdlib-common')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
commonTest {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('test-common')
|
|
||||||
implementation kotlin('test-annotations-common')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jvmMain {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('stdlib-jdk8')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jvmTest {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('test')
|
|
||||||
implementation kotlin('test-junit')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jsMain {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('stdlib-js')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
jsTest {
|
|
||||||
dependencies {
|
|
||||||
implementation kotlin('test-js')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mingwMain {
|
|
||||||
}
|
|
||||||
mingwTest {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
kotlin.code.style=official
|
|
||||||
Vendored
-9
@@ -1,9 +0,0 @@
|
|||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
{{kotlin_plugin_repositories}}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rootProject.name = 'mppLibrary'
|
|
||||||
|
|
||||||
enableFeaturePreview('GRADLE_METADATA')
|
|
||||||
-4
@@ -1,4 +0,0 @@
|
|||||||
package sample
|
|
||||||
fun common(): Boolean {
|
|
||||||
return <error descr="[TYPE_MISMATCH] Type mismatch: inferred type is String but Boolean was expected" textAttributesKey="ERRORS_ATTRIBUTES">""</error>
|
|
||||||
}
|
|
||||||
-6
@@ -1,6 +0,0 @@
|
|||||||
package sample
|
|
||||||
|
|
||||||
fun jvm() {
|
|
||||||
println(common())
|
|
||||||
println(<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: js" textAttributesKey="WRONG_REFERENCES_ATTRIBUTES">js</error>())
|
|
||||||
}
|
|
||||||
+1
-1
@@ -2,7 +2,7 @@ package sample
|
|||||||
|
|
||||||
expect fun <!LINE_MARKER("descr='Has actuals in common'")!>sameFile<!>()
|
expect fun <!LINE_MARKER("descr='Has actuals in common'")!>sameFile<!>()
|
||||||
|
|
||||||
actual fun <!LINE_MARKER("descr='null'")!>sameFile<!>() = Unit
|
actual fun <!LINE_MARKER!>sameFile<!>() = Unit
|
||||||
|
|
||||||
expect fun <!LINE_MARKER("descr='Has actuals in common'")!>sameModule<!>()
|
expect fun <!LINE_MARKER("descr='Has actuals in common'")!>sameModule<!>()
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@file:Suppress("UNUSED_PARAMETER")
|
@file:Suppress("UNUSED_PARAMETER")
|
||||||
|
|
||||||
expect open class MyCancelException : MyIllegalStateException
|
expect open class <!LINE_MARKER("descr='Has actuals in JVM'")!>MyCancelException<!> : MyIllegalStateException
|
||||||
|
|
||||||
fun cancel(cause: MyCancelException) {}
|
fun cancel(cause: MyCancelException) {}
|
||||||
|
|
||||||
expect open class OtherException : MyIllegalStateException
|
expect open class <!LINE_MARKER("descr='Has actuals in JVM'")!>OtherException<!> : MyIllegalStateException
|
||||||
|
|
||||||
fun other(cause: OtherException) {}
|
fun other(cause: OtherException) {}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
public expect open class MyException
|
public expect open class <!LINE_MARKER("descr='Is subclassed by MyCancelException [common] MyIllegalStateException [commonLibrary] OtherException [common]'"), LINE_MARKER("descr='Has actuals in JVM'")!>MyException<!>
|
||||||
|
|
||||||
public expect open class MyIllegalStateException : MyException
|
public expect open class <!LINE_MARKER("descr='Is subclassed by MyCancelException [common] OtherException [common]'"), LINE_MARKER("descr='Has actuals in JVM'")!>MyIllegalStateException<!> : MyException
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
actual typealias MyCancelException = platform.lib.MyCancellationException
|
actual typealias <!LINE_MARKER("descr='Has declaration in common module'")!>MyCancelException<!> = platform.lib.MyCancellationException
|
||||||
|
|
||||||
actual open class OtherException : platform.lib.MyIllegalStateException()
|
actual open class <!LINE_MARKER("descr='Has declaration in common module'")!>OtherException<!> : platform.lib.MyIllegalStateException()
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
cancel(MyCancelException()) // TYPE_MISMATCH
|
cancel(MyCancelException()) // TYPE_MISMATCH
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
actual typealias MyException = platform.lib.MyException
|
actual typealias <!LINE_MARKER("descr='Has declaration in common module'")!>MyException<!> = platform.lib.MyException
|
||||||
|
|
||||||
actual typealias MyIllegalStateException = platform.lib.MyIllegalStateException
|
actual typealias <!LINE_MARKER("descr='Has declaration in common module'")!>MyIllegalStateException<!> = platform.lib.MyIllegalStateException
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package platform.lib
|
package platform.lib
|
||||||
|
|
||||||
open class MyException
|
open class <!LINE_MARKER("descr='Is subclassed by MyCancellationException MyIllegalStateException OtherException [jvm]'")!>MyException<!>
|
||||||
|
|
||||||
open class MyIllegalStateException : MyException()
|
open class <!LINE_MARKER("descr='Is subclassed by MyCancellationException OtherException [jvm]'")!>MyIllegalStateException<!> : MyException()
|
||||||
|
|
||||||
open class MyCancellationException : MyIllegalStateException()
|
open class MyCancellationException : MyIllegalStateException()
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect interface A {
|
expect interface <!LINE_MARKER("descr='Is subclassed by B [common-1] B [jvm]'"), LINE_MARKER("descr='Has actuals in common'")!>A<!> {
|
||||||
fun common_1_A()
|
fun <!LINE_MARKER("descr='Has actuals in common'")!>common_1_A<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
expect interface B : A {
|
expect interface B : A {
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect interface C {
|
expect interface <!LINE_MARKER("descr='Is subclassed by A [common-2] B [jvm]'"), LINE_MARKER("descr='Has actuals in JVM'")!>C<!> {
|
||||||
fun common_2_C()
|
fun <!LINE_MARKER("descr='Has actuals in JVM'")!>common_2_C<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
actual interface A : C {
|
actual interface <!LINE_MARKER("descr='Is implemented by B [jvm]'"), LINE_MARKER("descr='Has declaration in common module'")!>A<!> : C {
|
||||||
actual fun common_1_A()
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>common_1_A<!>()
|
||||||
fun common_2_A()
|
fun common_2_A()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual interface C {
|
actual interface <!LINE_MARKER("descr='Has declaration in common module'")!>C<!> {
|
||||||
actual fun common_2_C()
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>common_2_C<!>()
|
||||||
fun jvm_C()
|
fun jvm_C()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
expect class A {
|
expect class <!LINE_MARKER("descr='Has actuals in JVM'")!>A<!> {
|
||||||
fun commonMember()
|
fun <!LINE_MARKER("descr='Has actuals in JVM'")!>commonMember<!>()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
actual class A {
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>A<!> {
|
||||||
actual fun commonMember() { }
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>commonMember<!>() { }
|
||||||
|
|
||||||
fun platformMember() { }
|
fun platformMember() { }
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
// KT-34027
|
// KT-34027
|
||||||
expect interface A<T> {
|
expect interface <!LINE_MARKER("descr='Has actuals in JS'")!>A<!><T> {
|
||||||
fun foo(x: T)
|
fun <!LINE_MARKER("descr='Has actuals in JS'")!>foo<!>(x: T)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun bar(): A<String> = null!!
|
fun bar(): A<String> = null!!
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
actual interface A<T> {
|
actual interface <!LINE_MARKER("descr='Has declaration in common module'")!>A<!><T> {
|
||||||
actual fun foo(x: T)
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>foo<!>(x: T)
|
||||||
fun foo(x: String)
|
fun foo(x: String)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
fun main() {
|
fun <!LINE_MARKER!>main<!>() {
|
||||||
ActualizedInLeft()
|
ActualizedInLeft()
|
||||||
ActualizedInRight()
|
ActualizedInRight()
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual class ActualizedInLeft
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>ActualizedInLeft<!>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual class ActualizedInRight
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>ActualizedInRight<!>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect class ActualizedInLeft
|
expect class <!LINE_MARKER("descr='Has actuals in common'")!>ActualizedInLeft<!>
|
||||||
expect class ActualizedInRight
|
expect class <!LINE_MARKER("descr='Has actuals in common'")!>ActualizedInRight<!>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ actual class A {
|
|||||||
fun fromBottom(): Int = 0
|
fun fromBottom(): Int = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
fun main() {
|
fun <!LINE_MARKER!>main<!>() {
|
||||||
A().foo()
|
A().foo()
|
||||||
|
|
||||||
// Any behaviour is acceptable, as the code is erroneous.
|
// Any behaviour is acceptable, as the code is erroneous.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual class A /* Left */ {
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>A<!> /* Left */ {
|
||||||
actual fun foo(): Int = 42
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>foo<!>(): Int = 42
|
||||||
fun fromLeft(): String = ""
|
fun fromLeft(): String = ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect class <!AMBIGUOUS_ACTUALS("Class 'A'; bottom, left")!>A<!> {
|
expect class <!AMBIGUOUS_ACTUALS("Class 'A'; bottom, left"), LINE_MARKER("descr='Has actuals in common'")!>A<!> {
|
||||||
fun <!AMBIGUOUS_ACTUALS("Function 'foo'; bottom, left")!>foo<!>(): Int
|
fun <!AMBIGUOUS_ACTUALS("Function 'foo'; bottom, left"), LINE_MARKER("descr='Has actuals in common'")!>foo<!>(): Int
|
||||||
}
|
}
|
||||||
@@ -4,8 +4,8 @@ package sample
|
|||||||
|
|
||||||
// --------------------------------------------
|
// --------------------------------------------
|
||||||
|
|
||||||
expect interface A {
|
expect interface <!LINE_MARKER("descr='Is subclassed by B'"), LINE_MARKER("descr='Has actuals in JVM (2 modules)'")!>A<!> {
|
||||||
fun foo()
|
fun <!LINE_MARKER("descr='Has actuals in JVM (2 modules)'")!>foo<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun take_A_common_1(x: A) {
|
fun take_A_common_1(x: A) {
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual interface A {
|
actual interface <!LINE_MARKER("descr='Is implemented by B'"), LINE_MARKER("descr='Has declaration in common module'")!>A<!> {
|
||||||
actual fun foo()
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>foo<!>()
|
||||||
fun bar()
|
fun bar()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual interface A {
|
actual interface <!LINE_MARKER("descr='Is implemented by B'"), LINE_MARKER("descr='Has declaration in common module'")!>A<!> {
|
||||||
actual fun foo()
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>foo<!>()
|
||||||
fun baz()
|
fun baz()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ interface BB
|
|||||||
interface CC
|
interface CC
|
||||||
interface DD
|
interface DD
|
||||||
|
|
||||||
expect interface A {
|
expect interface <!LINE_MARKER("descr='Is subclassed by B [common-2-1] C [common-2-2] D'"), LINE_MARKER("descr='Has actuals in common'")!>A<!> {
|
||||||
fun foo_A()
|
fun <!LINE_MARKER("descr='Has actuals in common'")!>foo_A<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun take0(x: A): AA = null!!
|
fun take0(x: A): AA = null!!
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
@file:Suppress("UNUSED_PARAMETER")
|
@file:Suppress("UNUSED_PARAMETER")
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect interface B : A {
|
expect interface <!LINE_MARKER("descr='Has actuals in JVM'")!>B<!> : A {
|
||||||
fun foo_B_1()
|
fun foo_B_1()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
@file:Suppress("UNUSED_PARAMETER")
|
@file:Suppress("UNUSED_PARAMETER")
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect interface C : A {
|
expect interface <!LINE_MARKER("descr='Has actuals in JVM'")!>C<!> : A {
|
||||||
fun foo_C_1()
|
fun foo_C_1()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
@file:Suppress("UNUSED_PARAMETER")
|
@file:Suppress("UNUSED_PARAMETER")
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual interface A {
|
actual interface <!LINE_MARKER("descr='Is implemented by D'"), LINE_MARKER("descr='Has declaration in common module'")!>A<!> {
|
||||||
actual fun foo_A()
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>foo_A<!>()
|
||||||
fun foo_A_3()
|
fun foo_A_3()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ interface D : A {
|
|||||||
fun foo_D()
|
fun foo_D()
|
||||||
}
|
}
|
||||||
|
|
||||||
actual typealias B = D
|
actual typealias <!LINE_MARKER("descr='Has declaration in common module'")!>B<!> = D
|
||||||
actual typealias C = D
|
actual typealias <!LINE_MARKER("descr='Has declaration in common module'")!>C<!> = D
|
||||||
|
|
||||||
fun take0(x: D): Unit = null!!
|
fun take0(x: D): Unit = null!!
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
fun main() {
|
fun <!LINE_MARKER!>main<!>() {
|
||||||
A().foo()
|
A().foo()
|
||||||
// fromLeft should be resolved, because 'left' comes first in dependencies order!
|
// fromLeft should be resolved, because 'left' comes first in dependencies order!
|
||||||
A().fromLeft()
|
A().fromLeft()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual class A /* Left */ {
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>A<!> /* Left */ {
|
||||||
actual fun foo(): Int = 42
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>foo<!>(): Int = 42
|
||||||
fun fromLeft(): String = ""
|
fun fromLeft(): String = ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual class A /* Right */ {
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>A<!> /* Right */ {
|
||||||
actual fun foo(): Int = 100500
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>foo<!>(): Int = 100500
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect class A {
|
expect class <!LINE_MARKER("descr='Has actuals in common (2 modules)'")!>A<!> {
|
||||||
fun foo(): Int
|
fun <!LINE_MARKER("descr='Has actuals in common (2 modules)'")!>foo<!>(): Int
|
||||||
}
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
expect class A
|
expect class <!LINE_MARKER("descr='Has actuals in JS, JVM'")!>A<!>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
actual class A
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>A<!>
|
||||||
|
|
||||||
// Error: ACTUAL_WITHOUT_EXPECT, becuase we shouldn't see expects through usual dependencies
|
// Error: ACTUAL_WITHOUT_EXPECT, becuase we shouldn't see expects through usual dependencies
|
||||||
actual class <!ACTUAL_WITHOUT_EXPECT!>B<!>
|
actual class <!ACTUAL_WITHOUT_EXPECT!>B<!>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
actual class A
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>A<!>
|
||||||
|
|
||||||
// Error: ACTUAL_WITHOUT_EXPECT, becuase we shouldn't see expects through usual dependencies
|
// Error: ACTUAL_WITHOUT_EXPECT, becuase we shouldn't see expects through usual dependencies
|
||||||
actual class <!ACTUAL_WITHOUT_EXPECT!>B<!>
|
actual class <!ACTUAL_WITHOUT_EXPECT!>B<!>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
actual class A
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>A<!>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
expect class <!AMBIGUOUS_ACTUALS!>A<!>
|
expect class <!AMBIGUOUS_ACTUALS, LINE_MARKER("descr='Has actuals in common'")!>A<!>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
actual class ActualInMiddleCompatibleInBottom
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>ActualInMiddleCompatibleInBottom<!>
|
||||||
class <!ACTUAL_MISSING!>CompatibleInMiddleActualInBottom<!>
|
class <!ACTUAL_MISSING!>CompatibleInMiddleActualInBottom<!>
|
||||||
|
|
||||||
class <!ACTUAL_MISSING!>CompatibleInMiddleAndBottom<!>
|
class <!ACTUAL_MISSING!>CompatibleInMiddleAndBottom<!>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
expect class <!AMBIGUOUS_ACTUALS("Class 'ActualInMiddleCompatibleInBottom'; bottom, middle")!>ActualInMiddleCompatibleInBottom<!>
|
expect class <!AMBIGUOUS_ACTUALS("Class 'ActualInMiddleCompatibleInBottom'; bottom, middle"), LINE_MARKER("descr='Has actuals in common'")!>ActualInMiddleCompatibleInBottom<!>
|
||||||
expect class <!AMBIGUOUS_ACTUALS("Class 'CompatibleInMiddleActualInBottom'; bottom, middle")!>CompatibleInMiddleActualInBottom<!>
|
expect class <!AMBIGUOUS_ACTUALS("Class 'CompatibleInMiddleActualInBottom'; bottom, middle")!>CompatibleInMiddleActualInBottom<!>
|
||||||
|
|
||||||
expect class <!AMBIGUOUS_ACTUALS("Class 'CompatibleInMiddleAndBottom'; bottom, middle")!>CompatibleInMiddleAndBottom<!>
|
expect class <!AMBIGUOUS_ACTUALS("Class 'CompatibleInMiddleAndBottom'; bottom, middle")!>CompatibleInMiddleAndBottom<!>
|
||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
actual class A
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>A<!>
|
||||||
+1
-1
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
expect class <!AMBIGUOUS_ACTUALS("Class 'A'; bottom, middle")!>A<!>
|
expect class <!AMBIGUOUS_ACTUALS("Class 'A'; bottom, middle"), LINE_MARKER("descr='Has actuals in common'")!>A<!>
|
||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
actual fun foo(): Int = 42
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>foo<!>(): Int = 42
|
||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
expect fun foo(): Int
|
expect fun <!LINE_MARKER("descr='Has actuals in common'")!>foo<!>(): Int
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
// !RENDER_DIAGNOSTICS_MESSAGES
|
// !RENDER_DIAGNOSTICS_MESSAGES
|
||||||
|
|
||||||
actual class <!AMBIGUOUS_EXPECTS("Actual class 'A'; left, right")!>A<!>
|
actual class <!AMBIGUOUS_EXPECTS("Actual class 'A'; left, right"), LINE_MARKER("descr='Has declaration in common module'")!>A<!>
|
||||||
@@ -1 +1 @@
|
|||||||
expect class A
|
expect class <!LINE_MARKER("descr='Has actuals in JVM'")!>A<!>
|
||||||
@@ -1 +1 @@
|
|||||||
expect class A
|
expect class <!LINE_MARKER("descr='Has actuals in JVM'")!>A<!>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
// Note that here we have no ambiguity, becuase we don't consider
|
// Note that here we have no ambiguity, becuase we don't consider
|
||||||
// declarations without 'expect' as potential weakly-compatible 'expect'-counterpart
|
// declarations without 'expect' as potential weakly-compatible 'expect'-counterpart
|
||||||
actual class A
|
actual class <!LINE_MARKER("descr='Has declaration in common module'"), LINE_MARKER("descr='Has declaration in common module'")!>A<!>
|
||||||
@@ -1 +1 @@
|
|||||||
expect class A
|
expect class <!LINE_MARKER("descr='Has actuals in JVM'")!>A<!>
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
actual fun foo(): Int = 42
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>foo<!>(): Int = 42
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
expect fun foo(): Int
|
expect fun <!LINE_MARKER("descr='Has actuals in JVM'")!>foo<!>(): Int
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
expect fun foo<!NO_ACTUAL_FOR_EXPECT!>(x: Int)<!>: Int
|
expect fun <!LINE_MARKER("descr='Has actuals in JVM'")!>foo<!><!NO_ACTUAL_FOR_EXPECT!>(x: Int)<!>: Int
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
expect class E {
|
expect class <!LINE_MARKER("descr='Has actuals in JVM'")!>E<!> {
|
||||||
fun commonMember()
|
fun <!LINE_MARKER("descr='Has actuals in JVM'")!>commonMember<!>()
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
actual class E {
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>E<!> {
|
||||||
actual fun commonMember() {}
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>commonMember<!>() {}
|
||||||
|
|
||||||
fun platformMember() {}
|
fun platformMember() {}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
expect class ExpectInCommonActualInMiddle
|
expect class <!LINE_MARKER("descr='Has actuals in common'")!>ExpectInCommonActualInMiddle<!>
|
||||||
expect class ExpectInCommonActualInPlatforms
|
expect class ExpectInCommonActualInPlatforms
|
||||||
|
|
||||||
expect class <!NO_ACTUAL_FOR_EXPECT, NO_ACTUAL_FOR_EXPECT!>ExpectInCommonWithoutActual<!>
|
expect class <!NO_ACTUAL_FOR_EXPECT, NO_ACTUAL_FOR_EXPECT!>ExpectInCommonWithoutActual<!>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package foo
|
|||||||
|
|
||||||
actual class ExpectInCommonActualInPlatforms
|
actual class ExpectInCommonActualInPlatforms
|
||||||
|
|
||||||
actual class ExpectInMiddleActualInPlatforms
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>ExpectInMiddleActualInPlatforms<!>
|
||||||
|
|
||||||
expect class <!NO_ACTUAL_FOR_EXPECT!>ExpectInJsWithoutActual<!>
|
expect class <!NO_ACTUAL_FOR_EXPECT!>ExpectInJsWithoutActual<!>
|
||||||
|
|
||||||
expect class ExpectInJsActualInJs
|
expect class <!LINE_MARKER("descr='Has actuals in JS'")!>ExpectInJsActualInJs<!>
|
||||||
actual class ExpectInJsActualInJs
|
actual class <!LINE_MARKER!>ExpectInJsActualInJs<!>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
actual class ExpectInCommonActualInPlatforms
|
actual class ExpectInCommonActualInPlatforms
|
||||||
actual class ExpectInMiddleActualInPlatforms
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>ExpectInMiddleActualInPlatforms<!>
|
||||||
|
|
||||||
expect class <!NO_ACTUAL_FOR_EXPECT!>ExpectInJvmWithoutActual<!>
|
expect class <!NO_ACTUAL_FOR_EXPECT!>ExpectInJvmWithoutActual<!>
|
||||||
|
|
||||||
expect class ExpectInJvmActualInJvm
|
expect class <!LINE_MARKER("descr='Has actuals in JVM'")!>ExpectInJvmActualInJvm<!>
|
||||||
actual class ExpectInJvmActualInJvm
|
actual class <!LINE_MARKER!>ExpectInJvmActualInJvm<!>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
actual class ExpectInCommonActualInMiddle
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>ExpectInCommonActualInMiddle<!>
|
||||||
|
|
||||||
expect class ExpectInMiddleActualInPlatforms
|
expect class <!LINE_MARKER("descr='Has actuals in JVM, JS'")!>ExpectInMiddleActualInPlatforms<!>
|
||||||
|
|
||||||
expect class <!NO_ACTUAL_FOR_EXPECT, NO_ACTUAL_FOR_EXPECT!>ExpectInMiddleWithoutActual<!>
|
expect class <!NO_ACTUAL_FOR_EXPECT, NO_ACTUAL_FOR_EXPECT!>ExpectInMiddleWithoutActual<!>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
actual class ExpectInCommonActualInJsOnly
|
actual class ExpectInCommonActualInJsOnly
|
||||||
actual class ExpectInMiddleActualInJsOnly
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>ExpectInMiddleActualInJsOnly<!>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
actual class ExpectInCommonActualInJvmOnly
|
actual class ExpectInCommonActualInJvmOnly
|
||||||
actual class ExpectInMiddleActualInJvmOnly
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>ExpectInMiddleActualInJvmOnly<!>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package foo
|
package foo
|
||||||
|
|
||||||
expect class <!NO_ACTUAL_FOR_EXPECT!>ExpectInMiddleActualInJsOnly<!>
|
expect class <!LINE_MARKER("descr='Has actuals in JS'"), NO_ACTUAL_FOR_EXPECT!>ExpectInMiddleActualInJsOnly<!>
|
||||||
expect class <!NO_ACTUAL_FOR_EXPECT!>ExpectInMiddleActualInJvmOnly<!>
|
expect class <!LINE_MARKER("descr='Has actuals in JVM'"), NO_ACTUAL_FOR_EXPECT!>ExpectInMiddleActualInJvmOnly<!>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect interface Input
|
expect interface <!LINE_MARKER("descr='Is subclassed by AbstractInput JSInput'"), LINE_MARKER("descr='Has actuals in JS'")!>Input<!>
|
||||||
|
|
||||||
abstract class AbstractInput : Input {
|
abstract class <!LINE_MARKER("descr='Is subclassed by JSInput'")!>AbstractInput<!> : Input {
|
||||||
val head: Int = null!!
|
val head: Int = null!!
|
||||||
}
|
}
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual interface Input
|
actual interface <!LINE_MARKER("descr='Has declaration in common module'")!>Input<!>
|
||||||
|
|
||||||
class JSInput : AbstractInput()
|
class JSInput : AbstractInput()
|
||||||
|
|
||||||
// ------------------------------------
|
// ------------------------------------
|
||||||
|
|
||||||
expect class ExpectInJsActualInJs
|
expect class <!LINE_MARKER("descr='Has actuals in JS'")!>ExpectInJsActualInJs<!>
|
||||||
actual class ExpectInJsActualInJs
|
actual class <!LINE_MARKER!>ExpectInJsActualInJs<!>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package base
|
package base
|
||||||
|
|
||||||
interface Check {
|
interface <!LINE_MARKER("descr='Is implemented by CheckClass SubCheck SubCheckClass'")!>Check<!> {
|
||||||
fun test(): String {
|
fun <!LINE_MARKER("descr='Is overridden in SubCheck'")!>test<!>(): String {
|
||||||
return "fail";
|
return "fail";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open class CheckClass : Check
|
open class <!LINE_MARKER("descr='Is subclassed by SubCheckClass'")!>CheckClass<!> : Check
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import base.*
|
import base.*
|
||||||
|
|
||||||
interface SubCheck : Check {
|
interface <!LINE_MARKER("descr='Is implemented by SubCheckClass'")!>SubCheck<!> : Check {
|
||||||
override fun test(): String {
|
override fun <!LINE_MARKER("descr='Overrides function in 'Check''")!>test<!>(): String {
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect interface A
|
expect interface <!LINE_MARKER("descr='Has actuals in JVM'")!>A<!>
|
||||||
|
|
||||||
fun useA(block: A.() -> Unit) {}
|
fun useA(block: A.() -> Unit) {}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual interface A {
|
actual interface <!LINE_MARKER("descr='Has declaration in common module'")!>A<!> {
|
||||||
fun foo()
|
fun foo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect class A {
|
expect class <!LINE_MARKER("descr='Has actuals in JVM'")!>A<!> {
|
||||||
fun commonFun()
|
fun <!LINE_MARKER("descr='Has actuals in JVM'")!>commonFun<!>()
|
||||||
val x: Int
|
val <!LINE_MARKER("descr='Has actuals in JVM'")!>x<!>: Int
|
||||||
val y: Double
|
val <!LINE_MARKER("descr='Has actuals in JVM'")!>y<!>: Double
|
||||||
val z: String
|
val <!LINE_MARKER("descr='Has actuals in JVM'")!>z<!>: String
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getCommonA(): A = null!!
|
fun getCommonA(): A = null!!
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual data class A(actual val x: Int, actual val y: Double, val t: String) {
|
actual data class <!LINE_MARKER("descr='Has declaration in common module'")!>A<!>(actual val x: Int, actual val y: Double, val t: String) {
|
||||||
actual fun commonFun() {}
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>commonFun<!>() {}
|
||||||
fun platformFun() {}
|
fun platformFun() {}
|
||||||
|
|
||||||
actual val z: String by lazy { "" }
|
actual val <!LINE_MARKER("descr='Has declaration in common module'")!>z<!>: String by lazy { "" }
|
||||||
|
|
||||||
operator fun iterator(): Iterator<Int> = null!!
|
operator fun iterator(): Iterator<Int> = null!!
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect interface A {
|
expect interface <!LINE_MARKER("descr='Is subclassed by B [common-1] B [common-2] Case_2_3'"), LINE_MARKER("descr='Has actuals in common'")!>A<!> {
|
||||||
fun common_1_A()
|
fun common_1_A()
|
||||||
}
|
}
|
||||||
|
|
||||||
expect interface B : A {
|
expect interface <!LINE_MARKER("descr='Is subclassed by Case_2_3'"), LINE_MARKER("descr='Has actuals in common'")!>B<!> : A {
|
||||||
fun common_1_B()
|
fun <!LINE_MARKER("descr='Has actuals in common'")!>common_1_B<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getB(): B = null!!
|
fun getB(): B = null!!
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect interface A_Common {
|
expect interface <!LINE_MARKER("descr='Is subclassed by B [common-2] Case_2_3'"), LINE_MARKER("descr='Has actuals in JVM'")!>A_Common<!> {
|
||||||
fun common_1_A()
|
fun <!LINE_MARKER("descr='Has actuals in JVM'")!>common_1_A<!>()
|
||||||
fun common_2_A()
|
fun <!LINE_MARKER("descr='Has actuals in JVM'")!>common_2_A<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
actual typealias A = A_Common
|
actual typealias <!LINE_MARKER("descr='Has declaration in common module'")!>A<!> = A_Common
|
||||||
|
|
||||||
actual interface B : A {
|
actual interface <!LINE_MARKER("descr='Is implemented by Case_2_3'"), LINE_MARKER("descr='Has declaration in common module'")!>B<!> : A {
|
||||||
actual fun common_1_B()
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>common_1_B<!>()
|
||||||
fun common_1_2_B()
|
fun common_1_2_B()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual interface A_Common {
|
actual interface <!LINE_MARKER("descr='Has declaration in common module'")!>A_Common<!> {
|
||||||
actual fun common_1_A()
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>common_1_A<!>()
|
||||||
actual fun common_2_A()
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>common_2_A<!>()
|
||||||
fun jvm_A()
|
fun jvm_A()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package sample
|
||||||
|
|
||||||
|
expect class <!LINE_MARKER("descr='Has actuals in JVM, JS'")!>Sample<!>() {
|
||||||
|
fun <!LINE_MARKER("descr='Has actuals in JVM, JS'")!>checkMe<!>(): Int
|
||||||
|
}
|
||||||
|
|
||||||
|
expect object <!LINE_MARKER("descr='Has actuals in JVM, JS'")!>Platform<!> {
|
||||||
|
val <!LINE_MARKER("descr='Has actuals in JVM, JS'")!>name<!>: String
|
||||||
|
}
|
||||||
|
|
||||||
|
fun hello(): String = "Hello from ${Platform.name}"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
MODULE common { platform=[JVM, JS, Native]; root=common }
|
||||||
|
MODULE jvm { platform=[JVM]; root=jvm; testRoot=jvmTest}
|
||||||
|
MODULE js { platform=[JS]; root=js }
|
||||||
|
|
||||||
|
common -> STDLIB_COMMON { kind=DEPENDENCY }
|
||||||
|
jvm -> common { kind=DEPENDS_ON }
|
||||||
|
jvm -> STDLIB_JVM, KOTLIN_TEST, KOTLIN_TEST_JVM, JUNIT, MOCK_JDK { kind=DEPENDENCY }
|
||||||
|
js -> common { kind=DEPENDS_ON }
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package sample
|
||||||
|
|
||||||
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>Sample<!> {
|
||||||
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>checkMe<!>() = 12
|
||||||
|
}
|
||||||
|
|
||||||
|
actual object <!LINE_MARKER("descr='Has declaration in common module'")!>Platform<!> {
|
||||||
|
actual val <!LINE_MARKER("descr='Has declaration in common module'")!>name<!>: String = "JS"
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package sample
|
||||||
|
|
||||||
|
actual class <!LINE_MARKER("descr='Has declaration in common module'")!>Sample<!> {
|
||||||
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>checkMe<!>() = 42
|
||||||
|
}
|
||||||
|
|
||||||
|
actual object <!LINE_MARKER("descr='Has declaration in common module'")!>Platform<!> {
|
||||||
|
actual val <!LINE_MARKER("descr='Has declaration in common module'")!>name<!>: String = "JVM"
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package sample
|
||||||
|
|
||||||
|
import kotlin.test.Test
|
||||||
|
import kotlin.test.assertTrue
|
||||||
|
|
||||||
|
class <!LINE_MARKER("descr='Run Test'")!>SampleTestsJVM<!> {
|
||||||
|
@Test
|
||||||
|
fun <!LINE_MARKER("descr='Run Test'")!>testHello<!>() {
|
||||||
|
assertTrue("JVM" in hello())
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
expect class Expect
|
expect class <!LINE_MARKER("descr='Has actuals in JVM'")!>Expect<!>
|
||||||
|
|
||||||
interface Base {
|
interface <!LINE_MARKER("descr='Is implemented by Derived'")!>Base<!> {
|
||||||
fun expectInReturnType(): Expect
|
fun <!LINE_MARKER("descr='Is implemented in Derived'")!>expectInReturnType<!>(): Expect
|
||||||
|
|
||||||
fun expectInArgument(e: Expect)
|
fun expectInArgument(e: Expect)
|
||||||
|
|
||||||
fun Expect.expectInReceiver()
|
fun Expect.expectInReceiver()
|
||||||
|
|
||||||
val expectVal: Expect
|
val <!LINE_MARKER("descr='Is implemented in Derived'")!>expectVal<!>: Expect
|
||||||
|
|
||||||
var expectVar: Expect
|
var <!LINE_MARKER("descr='Is implemented in Derived'")!>expectVar<!>: Expect
|
||||||
}
|
}
|
||||||
+6
-6
@@ -1,13 +1,13 @@
|
|||||||
actual typealias Expect = String
|
actual typealias <!LINE_MARKER("descr='Has declaration in common module'")!>Expect<!> = String
|
||||||
|
|
||||||
interface Derived : Base {
|
interface Derived : Base {
|
||||||
override fun expectInReturnType(): Expect
|
override fun <!LINE_MARKER("descr='Overrides function in 'Base''")!>expectInReturnType<!>(): Expect
|
||||||
|
|
||||||
override fun expectInArgument(e: Expect)
|
override fun <!LINE_MARKER("descr='Overrides function in 'Base''")!>expectInArgument<!>(e: Expect)
|
||||||
|
|
||||||
override fun Expect.expectInReceiver()
|
override fun Expect.<!LINE_MARKER("descr='Overrides function in 'Base''")!>expectInReceiver<!>()
|
||||||
|
|
||||||
override val expectVal: Expect
|
override val <!LINE_MARKER("descr='Overrides property in 'Base''")!>expectVal<!>: Expect
|
||||||
|
|
||||||
override var expectVar: Expect
|
override var <!LINE_MARKER("descr='Overrides property in 'Base''")!>expectVar<!>: Expect
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -1,15 +1,15 @@
|
|||||||
expect class Expect
|
expect class <!LINE_MARKER("descr='Has actuals in JVM'")!>Expect<!>
|
||||||
|
|
||||||
class Box<out T>(val x: T)
|
class Box<out T>(val x: T)
|
||||||
|
|
||||||
interface Base {
|
interface <!LINE_MARKER("descr='Is implemented by Derived'")!>Base<!> {
|
||||||
fun expectInReturnType(): Box<Expect>
|
fun <!LINE_MARKER("descr='Is implemented in Derived'")!>expectInReturnType<!>(): Box<Expect>
|
||||||
|
|
||||||
fun expectInArgument(e: Box<Expect>)
|
fun expectInArgument(e: Box<Expect>)
|
||||||
|
|
||||||
fun Box<Expect>.expectInReceiver()
|
fun Box<Expect>.expectInReceiver()
|
||||||
|
|
||||||
val expectVal: Box<Expect>
|
val <!LINE_MARKER("descr='Is implemented in Derived'")!>expectVal<!>: Box<Expect>
|
||||||
|
|
||||||
var expectVar: Box<Expect>
|
var <!LINE_MARKER("descr='Is implemented in Derived'")!>expectVar<!>: Box<Expect>
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
actual typealias Expect = String
|
actual typealias <!LINE_MARKER("descr='Has declaration in common module'")!>Expect<!> = String
|
||||||
|
|
||||||
interface Derived : Base {
|
interface Derived : Base {
|
||||||
override fun expectInReturnType(): Box<Expect>
|
override fun <!LINE_MARKER("descr='Overrides function in 'Base''")!>expectInReturnType<!>(): Box<Expect>
|
||||||
|
|
||||||
override fun expectInArgument(e: Box<Expect>)
|
override fun <!LINE_MARKER("descr='Overrides function in 'Base''")!>expectInArgument<!>(e: Box<Expect>)
|
||||||
|
|
||||||
override fun Box<Expect>.expectInReceiver()
|
override fun Box<Expect>.<!LINE_MARKER("descr='Overrides function in 'Base''")!>expectInReceiver<!>()
|
||||||
|
|
||||||
override val expectVal: Box<Expect>
|
override val <!LINE_MARKER("descr='Overrides property in 'Base''")!>expectVal<!>: Box<Expect>
|
||||||
|
|
||||||
override var expectVar: Box<Expect>
|
override var <!LINE_MARKER("descr='Overrides property in 'Base''")!>expectVar<!>: Box<Expect>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
expect interface A {
|
expect interface <!LINE_MARKER("descr='Has actuals in JVM'")!>A<!> {
|
||||||
fun commonFun()
|
fun <!LINE_MARKER("descr='Has actuals in JVM'")!>commonFun<!>()
|
||||||
val b: B
|
val <!LINE_MARKER("descr='Has actuals in JVM'")!>b<!>: B
|
||||||
fun bFun(): B
|
fun <!LINE_MARKER("descr='Has actuals in JVM'")!>bFun<!>(): B
|
||||||
}
|
}
|
||||||
|
|
||||||
expect interface B {
|
expect interface <!LINE_MARKER("descr='Has actuals in JVM'")!>B<!> {
|
||||||
fun commonFunB()
|
fun <!LINE_MARKER("descr='Has actuals in JVM'")!>commonFunB<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
class Common {
|
class Common {
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
package foo
|
package foo
|
||||||
|
|
||||||
actual interface A {
|
actual interface <!LINE_MARKER("descr='Has declaration in common module'")!>A<!> {
|
||||||
actual fun commonFun()
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>commonFun<!>()
|
||||||
actual val b: B
|
actual val <!LINE_MARKER("descr='Has declaration in common module'")!>b<!>: B
|
||||||
actual fun bFun(): B
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>bFun<!>(): B
|
||||||
fun platformFun()
|
fun platformFun()
|
||||||
}
|
}
|
||||||
|
|
||||||
actual interface B {
|
actual interface <!LINE_MARKER("descr='Has declaration in common module'")!>B<!> {
|
||||||
actual fun commonFunB()
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>commonFunB<!>()
|
||||||
fun platformFunB()
|
fun platformFunB()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
expect interface A<T : A<T>> {
|
expect interface <!LINE_MARKER("descr='Is subclassed by B'"), LINE_MARKER("descr='Has actuals in JVM'")!>A<!><T : A<T>> {
|
||||||
fun foo(): T
|
fun <!LINE_MARKER("descr='Has actuals in JVM'")!>foo<!>(): T
|
||||||
}
|
}
|
||||||
|
|
||||||
interface B : A<B>
|
interface B : A<B>
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package sample
|
package sample
|
||||||
|
|
||||||
actual interface A<T : A<T>> {
|
actual interface <!LINE_MARKER("descr='Has declaration in common module'")!>A<!><T : A<T>> {
|
||||||
actual fun foo(): T
|
actual fun <!LINE_MARKER("descr='Has declaration in common module'")!>foo<!>(): T
|
||||||
fun bar() : T
|
fun bar() : T
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
package foobar
|
package foobar
|
||||||
import bar.baz
|
import bar.baz
|
||||||
|
|
||||||
fun main() {
|
fun <!LINE_MARKER!>main<!>() {
|
||||||
baz().foo()
|
baz().foo()
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user