Create expected quick-fix: check types accessibility before creation
Related to KT-27075
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
expect class Some {
|
||||
companion object {
|
||||
fun createMe(): Some
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>Some {
|
||||
actual companion object {
|
||||
actual fun createMe() = Some()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class <caret>Some {
|
||||
actual companion object {
|
||||
actual fun createMe() = Some()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
expect class SomeString
|
||||
// It would be great to have SomeString in foo() below, but it's problematic
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expect class SomeString
|
||||
// It would be great to have SomeString in foo() below, but it's problematic
|
||||
expect fun foo(): String
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual typealias SomeString = String
|
||||
|
||||
actual fun <caret>foo(): SomeString = ""
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual typealias SomeString = String
|
||||
|
||||
actual fun foo(): SomeString = ""
|
||||
+1
@@ -0,0 +1 @@
|
||||
expect fun foo(): String
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
typealias SomeString = String
|
||||
|
||||
actual fun <caret>foo(): SomeString = ""
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
typealias SomeString = String
|
||||
|
||||
actual fun foo(): SomeString = ""
|
||||
+1
@@ -0,0 +1 @@
|
||||
expect class Some
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expect class Some
|
||||
|
||||
expect fun foo(some: List<Some>)
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class Some
|
||||
|
||||
actual fun <caret>foo(some: List<Some>) {}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class Some
|
||||
|
||||
actual fun foo(some: List<Some>) {}
|
||||
+1
@@ -0,0 +1 @@
|
||||
// To be implemented
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: Cannot generate expected function: Type Some is not accessible from common code
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
actual fun <T : Some> <caret>foo(some: List<T>) {}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: Cannot generate expected function: Type Some is not accessible from common code
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
actual fun <T : Some> foo(some: List<T>) {}
|
||||
+1
@@ -0,0 +1 @@
|
||||
// To be implemented
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: Cannot generate expected function: Type Some is not accessible from common code
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class Some
|
||||
|
||||
actual fun <caret>foo(some: Some) {}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: Cannot generate expected function: Type Some is not accessible from common code
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class Some
|
||||
|
||||
actual fun foo(some: Some) {}
|
||||
+1
@@ -0,0 +1 @@
|
||||
// To be implemented
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: Cannot generate expected function: Type Some is not accessible from common code
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class Some
|
||||
|
||||
actual fun <caret>foo(some: List<Some>) {}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: Cannot generate expected function: Type Some is not accessible from common code
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class Some
|
||||
|
||||
actual fun foo(some: List<Some>) {}
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create expected function in common module proj_Common" "true"
|
||||
// SHOULD_FAIL_WITH: Cannot generate expected function: Type java.util.ArrayList<kotlin.Any> is not accessible from common code
|
||||
// DISABLE-ERRORS
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create expected function in common module proj_Common" "true"
|
||||
// SHOULD_FAIL_WITH: Cannot generate expected function: Type java.util.ArrayList<kotlin.Any> is not accessible from common code
|
||||
// DISABLE-ERRORS
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
Reference in New Issue
Block a user