Add first test for new multiplatform highlighting #KT-27494 Fixed
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
plugins {
|
||||
id 'kotlin-multiplatform' version '1.3.0'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
kotlin {
|
||||
targets {
|
||||
fromPreset(presets.jvm, 'jvm')
|
||||
fromPreset(presets.js, 'js')
|
||||
}
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
|
||||
}
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
|
||||
}
|
||||
}
|
||||
jsMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
pluginManagement {
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == "kotlin-multiplatform") {
|
||||
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
maven { url 'https://plugins.gradle.org/m2/' }
|
||||
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
rootProject.name = 'first'
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expect class <error descr="[NO_ACTUAL_FOR_EXPECT] Expected class 'My' has no actual declaration in module first_jsMain for JS">My</error> {
|
||||
fun foo()
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
fun foo() = "Java Script"
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
actual class My {
|
||||
actual fun foo() {}
|
||||
|
||||
actual fun <error descr="[ACTUAL_WITHOUT_EXPECT] Actual function 'bar' has no corresponding expected declaration">bar</error>() {}
|
||||
}
|
||||
Reference in New Issue
Block a user