[K2] Support serialization of complex annotations

#KT-57611 Fixed
This commit is contained in:
Ivan Kylchik
2023-03-31 17:52:07 +02:00
committed by Space Team
parent 4a50bd9b16
commit ac480e2285
17 changed files with 328 additions and 11 deletions
@@ -50,6 +50,19 @@ enum class SomeEnum {
B;
}
// TODO: can be uncommented after fix KT-57135
//@field:BinaryAnnotation("Str" + "ing")
//var x: Int = 5
//object Delegate {
// operator fun getValue(instance: Any?, property: Any) : String = ""
// operator fun setValue(instance: Any?, property: Any, value: String) {}
//}
//
//@delegate:BinaryAnnotation("Str" + "ing")
//val p: String by Delegate
// 7. VALUE_PARAMETER
fun @receiver:BinaryAnnotation("Str" + "ing") String.myExtension() { }
fun foo(@BinaryAnnotation("Str" + "ing") a: Int) { }