TypeAccessibilityChecker: add more tests
This commit is contained in:
Vendored
+1
@@ -0,0 +1 @@
|
||||
expect class A
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
class A(actual val <caret>a: Some, b: Int)
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
actual class A(val a: Some, b: Int)
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
These declarations cannot be transformed:
|
||||
a: Some
|
||||
(a: Some, b: Int)
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
expect class A {
|
||||
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
class A {
|
||||
actual val a: Some
|
||||
|
||||
actual <caret>constructor(a: Some, b: Int) {
|
||||
this.a = a
|
||||
}
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
actual class A {
|
||||
val a: Some
|
||||
|
||||
constructor(a: Some, b: Int) {
|
||||
this.a = a
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
These declarations cannot be transformed:
|
||||
actual val a: Some
|
||||
constructor(a: Some, b: Int){...}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,class A
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
actual class <caret>A<T : Some>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// To be implemented
|
||||
expect class A {
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
actual class A {
|
||||
actual fun <caret>a(): Some = TODO()
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
actual class A {
|
||||
fun <caret>a(): Some = TODO()
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
These declarations cannot be transformed:
|
||||
fun a() = TODO()
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expect class A {
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class A {
|
||||
class M
|
||||
actual fun <caret>a(): M = TODO()
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class A {
|
||||
class M
|
||||
fun <caret>a(): M = TODO()
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
These declarations cannot be transformed:
|
||||
fun a() = TODO()
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// To be implemented
|
||||
expect class A<T> {
|
||||
fun a(): T
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class A<T> {
|
||||
actual fun <caret>a(): T = TODO()
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class A<T> {
|
||||
actual fun a(): T = TODO()
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
// To be implemented
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
// To be implemented
|
||||
expect class A<T> {
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class A<T> {
|
||||
class B {
|
||||
actual fun <caret>a(): T = TODO()
|
||||
}
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class A<T> {
|
||||
class B {
|
||||
fun a(): T = TODO()
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
These declarations cannot be transformed:
|
||||
fun a() = TODO()
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
expect class A<T> {
|
||||
class C<F>
|
||||
class D<F : Any>
|
||||
class E<F : Any?>
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class A<T> {
|
||||
actual class B<F : T>
|
||||
actual class C<F>
|
||||
actual class D<F : Any>
|
||||
actual class <caret>E<F : Any?>
|
||||
actual class G<F : Dwwwq>
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class A<T> {
|
||||
class B<F : T>
|
||||
actual class C<F>
|
||||
actual class D<F : Any>
|
||||
actual class E<F : Any?>
|
||||
class G<F : Dwwwq>
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
These declarations cannot be transformed:
|
||||
class B
|
||||
class G
|
||||
+1
@@ -0,0 +1 @@
|
||||
// To be implemented
|
||||
+1
@@ -0,0 +1 @@
|
||||
// To be implemented
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,fun foo(some: List<T>){...}
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,fun foo(some: List<T>) = TODO()
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
actual fun <T : Some> foo(some: List<T>) {}
|
||||
actual fun <T> <caret>foo(some: List<T>): Some = TODO()
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
// To be implemented
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,fun foo(some: List<Some>){...}
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,fun foo(some: List<Some>){...}
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class Some
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
// To be implemented
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,fun foo(some: List<T>){...}
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,fun foo(some: List<T>){...}
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
// To be implemented
|
||||
|
||||
interface CommonClass
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,fun foo(some: Some){...}
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,fun foo(some: List<T>){...}
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class Some
|
||||
interface Some
|
||||
|
||||
actual fun foo(some: Some) {}
|
||||
actual fun <T : CommonClass, F : Some> <caret>foo(some: List<T>) {}
|
||||
+1
@@ -0,0 +1 @@
|
||||
// To be implemented
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected property in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,actual val foo: Some = TODO()
|
||||
// DISABLE-ERRORS
|
||||
|
||||
interface Some
|
||||
|
||||
actual val foo<caret>: Some = TODO()
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
// To be implemented
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected property in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,actual val <T>Some<T>.foo: Some<T> get() = TODO()
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class Some<T>
|
||||
|
||||
actual val <T>Some<T>.<caret>foo: Some<T> get() = TODO()
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
// To be implemented
|
||||
|
||||
class Some<T>
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected property in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,actual val <T: A> Some<T>.foo: Some<T> get() = TODO()
|
||||
// DISABLE-ERRORS
|
||||
interface A
|
||||
|
||||
actual val <T: A> Some<T>.<caret>foo: Some<T> get() = TODO()
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Create actual class for module testModule_JVM (JVM)" "true"
|
||||
package a
|
||||
|
||||
import b.B
|
||||
|
||||
expect class <caret>A : B
|
||||
@@ -0,0 +1,3 @@
|
||||
package b
|
||||
|
||||
open class B
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
import b.B
|
||||
|
||||
actual class A : B()
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
import b.B
|
||||
|
||||
expect class A : B
|
||||
@@ -0,0 +1,3 @@
|
||||
package b
|
||||
|
||||
open class B
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
package a
|
||||
|
||||
import b.B
|
||||
|
||||
actual class <caret>A : B()
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
// "Create expected function in common module testModule_Common" "true"
|
||||
// SHOULD_FAIL_WITH: You cannot create the expect declaration from:,fun foo(some: List<Some>){...}
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class Some
|
||||
|
||||
actual fun foo(some: List<Some>) {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expect class A<T> {
|
||||
inner class B<F : T>
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class A<T> {
|
||||
actual inner class <caret>B<F : T>
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class A<T> {
|
||||
actual inner class <caret>B<F : T>
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
expect open class A<T : A<T>> {
|
||||
class C<T>
|
||||
inner class B<F : C<C<C<A<T>>>>>
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual open class <caret>A<T: A<T>> {
|
||||
actual class C<T>
|
||||
actual inner class B<F : C<C<C<A<T>>>>>
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual open class A<T: A<T>> {
|
||||
actual class C<T>
|
||||
actual inner class B<F : C<C<C<A<T>>>>>
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
expect class A {
|
||||
class M
|
||||
|
||||
fun a(): M
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
class A {
|
||||
actual class M
|
||||
actual fun <caret>a(): M = TODO()
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// "Create expected class in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual class A {
|
||||
actual class M
|
||||
actual fun <caret>a(): M = TODO()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// To be implemented
|
||||
|
||||
class Some<T>
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// To be implemented
|
||||
|
||||
class Some<T>
|
||||
|
||||
expect val <T> Some<T>.<caret>foo: Some<T>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Create expected property in common module testModule_Common" "true"
|
||||
// DISABLE-ERRORS
|
||||
|
||||
actual val <T> Some<T>.<caret>foo: Some<T> get() = TODO()
|
||||
Reference in New Issue
Block a user