Don't assert that annotation class has constructor in AnnotationDeserializer

#KT-9758 Fixed
This commit is contained in:
Alexander Udalov
2015-11-03 15:24:20 +03:00
parent 1a0c2e2cf6
commit 748c0e7149
8 changed files with 53 additions and 12 deletions
@@ -0,0 +1,6 @@
package test
import kotlin.annotation.AnnotationTarget.*
@Target(CLASS, ANNOTATION_CLASS, TYPE_PARAMETER, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, TYPE, EXPRESSION, FILE)
annotation class Ann(val s: String)
@@ -0,0 +1,4 @@
package test
// Ha! Ann is no longer an annotation, it's an interface instead. But we shouldn't assert it anywhere in the compiler
interface Ann
@@ -0,0 +1,3 @@
package test
fun bar() = Test().foo("ok")
@@ -0,0 +1,11 @@
package test
public fun bar(): @test.Ann() kotlin.String
public interface Ann {
}
@test.Ann() public final class Test {
public constructor Test()
@test.Ann() public final fun foo(/*0*/ @test.Ann() s: @test.Ann() kotlin.String): @test.Ann() kotlin.String
}
@@ -0,0 +1,7 @@
package test
@Ann("class")
class Test {
@Ann("function")
fun foo(@Ann("parameter") s: @Ann("parameter type") String): @Ann("return type") String = @Ann("expression") s
}