[FIR] Support for EXPOSED_TYPE_PARAMETER_BOUND
This commit is contained in:
committed by
Mikhail Glukhikh
parent
bfffcf6b23
commit
02aa11a0a0
+35
@@ -0,0 +1,35 @@
|
||||
private open class A
|
||||
|
||||
internal open class B
|
||||
|
||||
public open class C {
|
||||
protected open class D
|
||||
}
|
||||
|
||||
public open class E
|
||||
|
||||
// invalid, A is private
|
||||
public class Test1<T: <!EXPOSED_TYPE_PARAMETER_BOUND!>A<!>>
|
||||
|
||||
// valid, both type parameters is public
|
||||
public class Test2<T: C, P: E>
|
||||
|
||||
// invalid, D is protected
|
||||
public class Test3<T: E, P: <!EXPOSED_TYPE_PARAMETER_BOUND!>C.D<!>>
|
||||
|
||||
// valid, B is internal
|
||||
internal class Test4<T: B>
|
||||
|
||||
// valid, B is internal
|
||||
private class Test5<T: B>
|
||||
|
||||
public class Container : C {
|
||||
// valid, D is protected in C
|
||||
protected class Test6<T: C.D>
|
||||
|
||||
// invalid, B is internal
|
||||
protected class Test7<T: <!EXPOSED_TYPE_PARAMETER_BOUND!>B<!>>
|
||||
}
|
||||
|
||||
// invalid, A is private, B is internal, D is protected
|
||||
public interface Test8<T: <!EXPOSED_TYPE_PARAMETER_BOUND!>A<!>, P: <!EXPOSED_TYPE_PARAMETER_BOUND!>B<!>, F: C, N: <!EXPOSED_TYPE_PARAMETER_BOUND!>C.D<!>, M: E>
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
FILE: exposedTypeParameters.kt
|
||||
private open class A : R|kotlin/Any| {
|
||||
public[private] constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
internal open class B : R|kotlin/Any| {
|
||||
public[internal] constructor(): R|B| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public open class C : R|kotlin/Any| {
|
||||
public constructor(): R|C| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
protected open class D : R|kotlin/Any| {
|
||||
public[protected] constructor(): R|C.D| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public open class E : R|kotlin/Any| {
|
||||
public constructor(): R|E| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final class Test1<T : R|A|> : R|kotlin/Any| {
|
||||
public constructor<T : R|A|>(): R|Test1<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final class Test2<T : R|C|, P : R|E|> : R|kotlin/Any| {
|
||||
public constructor<T : R|C|, P : R|E|>(): R|Test2<T, P>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final class Test3<T : R|E|, P : R|C.D|> : R|kotlin/Any| {
|
||||
public constructor<T : R|E|, P : R|C.D|>(): R|Test3<T, P>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
internal final class Test4<T : R|B|> : R|kotlin/Any| {
|
||||
public[internal] constructor<T : R|B|>(): R|Test4<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
private final class Test5<T : R|B|> : R|kotlin/Any| {
|
||||
public[private] constructor<T : R|B|>(): R|Test5<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final class Container : R|C| {
|
||||
public constructor(): R|Container| {
|
||||
super<R|C|>()
|
||||
}
|
||||
|
||||
protected final class Test6<T : R|C.D|> : R|kotlin/Any| {
|
||||
public[protected] constructor<T : R|C.D|>(): R|Container.Test6<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected final class Test7<T : R|B|> : R|kotlin/Any| {
|
||||
public[protected] constructor<T : R|B|>(): R|Container.Test7<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public abstract interface Test8<T : R|A|, P : R|B|, F : R|C|, N : R|C.D|, M : R|E|> : R|kotlin/Any| {
|
||||
}
|
||||
Reference in New Issue
Block a user