Add modality/visibility/inline to all expect/actual declarations in QF

So #KT-25539 Fixed
This commit is contained in:
Mikhail Glukhikh
2018-07-25 17:27:18 +03:00
parent 54b63ea43a
commit 14d6560e67
23 changed files with 119 additions and 44 deletions
@@ -0,0 +1,4 @@
// "Add 'inline' modifier" "true"
// ERROR: Only type parameters of inline functions can be reified
expect fun <reif<caret>ied T> inlineFun(t: T)
@@ -0,0 +1,4 @@
// "Add 'inline' modifier" "true"
// ERROR: Only type parameters of inline functions can be reified
expect inline fun <reified T> inlineFun(t: T)
@@ -0,0 +1 @@
actual fun <reified T> inlineFun(t: T) {}
@@ -0,0 +1 @@
actual inline fun <reified T> inlineFun(t: T) {}
@@ -0,0 +1,6 @@
// "Make 'getInternal' internal" "true"
// ERROR: 'public' function exposes its 'internal' return type Internal
internal expect class Internal
expect fun <caret>getInternal(): Internal
@@ -0,0 +1,6 @@
// "Make 'getInternal' internal" "true"
// ERROR: 'public' function exposes its 'internal' return type Internal
internal expect class Internal
internal expect fun getInternal(): Internal
@@ -0,0 +1,5 @@
internal actual class Internal
actual fun getInternal(): Internal {
return Internal()
}
@@ -0,0 +1,5 @@
internal actual class Internal
internal actual fun getInternal(): Internal {
return Internal()
}
@@ -0,0 +1 @@
expect class One
@@ -0,0 +1 @@
expect open class One
@@ -0,0 +1,5 @@
// "Make 'One' open" "true"
// ERROR: This type is final, so it cannot be inherited from
actual class One
class Two : <caret>One()
@@ -0,0 +1,5 @@
// "Make 'One' open" "true"
// ERROR: This type is final, so it cannot be inherited from
actual open class One
class Two : <caret>One()
@@ -0,0 +1,5 @@
// "Make 'One' open" "true"
// ERROR: This type is final, so it cannot be inherited from
expect class One
expect class Two : <caret>One
@@ -0,0 +1,5 @@
// "Make 'One' open" "true"
// ERROR: This type is final, so it cannot be inherited from
expect open class One
expect class Two : <caret>One
@@ -0,0 +1 @@
actual class One
@@ -0,0 +1 @@
actual open class One