Add test for overloading expect MemberDescriptors discrimination
Issue #KT-38298
This commit is contained in:
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven("https://dl.bintray.com/kotlin/kotlin-dev") // TODO: use the Gradle plugin from the current build
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0-dev-7568") // TODO: use the Gradle plugin from the current build
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven("https://dl.bintray.com/kotlin/kotlin-dev") // TODO: use the Gradle plugin from the current build
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
val commonMain by sourceSets.getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-common"))
|
||||
implementation(kotlin("stdlib"))
|
||||
}
|
||||
}
|
||||
|
||||
val commonTest by sourceSets.getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-common"))
|
||||
implementation(kotlin("test-annotations-common"))
|
||||
}
|
||||
}
|
||||
|
||||
// there is no Linux HMPP shortcut preset, so need to configure targets and common source sets manually
|
||||
val linuxMain by sourceSets.creating { dependsOn(commonMain) }
|
||||
val linuxTest by sourceSets.creating { dependsOn(commonTest) }
|
||||
|
||||
linuxX64 {
|
||||
compilations["main"].defaultSourceSet.dependsOn(linuxMain)
|
||||
compilations["test"].defaultSourceSet.dependsOn(linuxTest)
|
||||
}
|
||||
|
||||
linuxArm64 {
|
||||
compilations["main"].defaultSourceSet.dependsOn(linuxMain)
|
||||
compilations["test"].defaultSourceSet.dependsOn(linuxTest)
|
||||
}
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
kotlin.native.enableDependencyPropagation=false
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
pluginManagement {
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.name == "multiplatform") {
|
||||
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0-dev-7568") // TODO: use the Gradle plugin from the current build
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven("https://dl.bintray.com/kotlin/kotlin-dev") // TODO: use the Gradle plugin from the current build
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "test"
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package arm64
|
||||
|
||||
import kotlinx.cinterop.CPointer
|
||||
import platform.posix.FILE
|
||||
import platform.posix.fopen
|
||||
import platform.posix.fprintf
|
||||
import platform.zlib.uInt
|
||||
|
||||
fun test() {
|
||||
val file: CPointer< /* NAVIGATION-TARGET:typealias FILE = */ FILE> = /* NAVIGATION-TARGET:external fun fopen */ fopen("file.txt", "r") ?: return
|
||||
fun f1(): /* NAVIGATION-TARGET:typealias uInt = */ uInt = TODO()
|
||||
/* NAVIGATION-TARGET:external fun fprintf */ fprintf(null, "")
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package common
|
||||
|
||||
import kotlinx.cinterop.CPointer
|
||||
import platform.posix.FILE
|
||||
import platform.posix.fopen
|
||||
import platform.posix.fprintf
|
||||
import platform.zlib.uInt
|
||||
|
||||
fun test() {
|
||||
val file: CPointer< /* NAVIGATION-TARGET:expect class FILE */ FILE> = /* NAVIGATION-TARGET:external expect fun fopen */ fopen("file.txt", "r") ?: return
|
||||
fun f1(): /* NAVIGATION-TARGET:expect class uInt */ uInt = TODO()
|
||||
/* NAVIGATION-TARGET:external expect fun fprintf */ fprintf(null, "")
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package x64
|
||||
|
||||
import kotlinx.cinterop.CPointer
|
||||
import platform.posix.FILE
|
||||
import platform.posix.fopen
|
||||
import platform.posix.fprintf
|
||||
import platform.zlib.uInt
|
||||
|
||||
fun test() {
|
||||
val file: CPointer< /* NAVIGATION-TARGET:typealias FILE = */ FILE> = /* NAVIGATION-TARGET:external fun fopen */ fopen("file.txt", "r") ?: return
|
||||
fun f1(): /* NAVIGATION-TARGET:typealias uInt = */ uInt = TODO()
|
||||
/* NAVIGATION-TARGET:external fun fprintf */ fprintf(null, "")
|
||||
}
|
||||
Reference in New Issue
Block a user