Load WasExperimental values correctly for associated declarations

For example, if a class is `@SinceKotlin("X")
@WasExperimental(M::class)`, then its constructor should also be
accessible if API < X, provided that the opt-in to M is given
This commit is contained in:
Alexander Udalov
2018-05-04 15:12:47 +02:00
parent 9995438b37
commit 1f0d3d9c7c
4 changed files with 63 additions and 17 deletions
@@ -8,6 +8,8 @@ class Bar @SinceKotlin("1.1") constructor()
@SinceKotlin("1.0")
class Baz @SinceKotlin("1.1") constructor()
@SinceKotlin("1.1")
class Quux @SinceKotlin("1.0") constructor()
fun t1(): <!API_NOT_AVAILABLE!>Foo<!> = <!UNRESOLVED_REFERENCE!>Foo<!>()
@@ -17,3 +19,5 @@ fun t2() = object : <!UNRESOLVED_REFERENCE, API_NOT_AVAILABLE, API_NOT_AVAILABLE
fun t3(): Bar? = <!UNRESOLVED_REFERENCE!>Bar<!>()
fun t4(): Baz = <!UNRESOLVED_REFERENCE!>Baz<!>()
fun t5(): <!API_NOT_AVAILABLE!>Quux<!> = <!UNRESOLVED_REFERENCE!>Quux<!>()