Don't assert that annotation class has constructor in AnnotationDeserializer
#KT-9758 Fixed
This commit is contained in:
+6
@@ -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)
|
||||
+4
@@ -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
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun bar() = Test().foo("ok")
|
||||
+11
@@ -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
|
||||
}
|
||||
+7
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user