Add a set of new tests for KT-27075 (create expected class) + some fixes
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
// My: to be implemented
|
||||
// DISABLE-ERRORS
|
||||
|
||||
annotation class CommonAnnotation
|
||||
@@ -0,0 +1,10 @@
|
||||
// My: to be implemented
|
||||
// DISABLE-ERRORS
|
||||
|
||||
annotation class CommonAnnotation
|
||||
expect class My {
|
||||
tailrec fun foo(arg: Int): Int
|
||||
var some: Boolean
|
||||
fun initialize()
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
annotation class PlatformAnnotation
|
||||
|
||||
actual class <caret>My {
|
||||
@PlatformAnnotation
|
||||
actual tailrec fun foo(arg: Int): Int {
|
||||
if (arg <= 1) return 1
|
||||
return foo(arg - 1)
|
||||
}
|
||||
|
||||
// Here we will have an error (lateinit is not supported on both sides)
|
||||
actual lateinit var some: Boolean
|
||||
|
||||
@CommonAnnotation
|
||||
actual fun initialize() {
|
||||
some = true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
annotation class PlatformAnnotation
|
||||
|
||||
actual class <caret>My {
|
||||
@PlatformAnnotation
|
||||
actual tailrec fun foo(arg: Int): Int {
|
||||
if (arg <= 1) return 1
|
||||
return foo(arg - 1)
|
||||
}
|
||||
|
||||
// Here we will have an error (lateinit is not supported on both sides)
|
||||
actual lateinit var some: Boolean
|
||||
|
||||
@CommonAnnotation
|
||||
actual fun initialize() {
|
||||
some = true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user