Allopen: Handle allopen annotations on classes (KT-12149)

This commit is contained in:
Yan Zhulanow
2016-09-29 13:56:14 +03:00
committed by Yan Zhulanow
parent 58f408e173
commit f57df272ac
33 changed files with 815 additions and 36 deletions
@@ -0,0 +1,33 @@
annotation class AllOpen
@AllOpen
annotation class MyComponent
@MyComponent // Double-transitive annotations is not supported
annotation class OtherComponent
class TestWithoutAnnotations_ShouldBeFinal
@AllOpen
class TestAllOpen_ShouldBeOpen
@MyComponent
class TestMyComponent_ShouldBeOpen
@OtherComponent
class TestOtherComponent_ShouldBeFinal
@MyComponent
abstract class MyComponentBase
class MyComponentImpl_ShouldBeOpen : MyComponentBase() {
fun method() {}
}
final class MyComponentImpl2_ShouldBeFinal : MyComponentBase() {
fun method() {}
}
class MyComponentImpl3_ShouldBeOpen : MyComponentBase() {
final fun method_ShouldBeFinal() {}
}