Add JVM target bytecode version 19
Test data in `box/annotations/typeAnnotations` is changed because nested classes in type annotations are rendered differently in JDK 19 (`Outer.Nested` instead of `Outer$Nested`). #KT-54116 Fixed
This commit is contained in:
+6
-8
@@ -11,14 +11,12 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE_USE)
|
||||
@interface TypeAnn {}
|
||||
|
||||
public class ImplicitReturn {
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE_USE)
|
||||
public @ interface TypeAnn {}
|
||||
|
||||
@ImplicitReturn.TypeAnn
|
||||
@TypeAnn
|
||||
public String bar() {
|
||||
return "OK";
|
||||
}
|
||||
@@ -45,14 +43,14 @@ fun box(): String {
|
||||
checkTypeAnnotation(
|
||||
Kotlin::foo.javaMethod!!.annotatedReturnType,
|
||||
"class java.lang.String",
|
||||
"@ImplicitReturn\$TypeAnn()",
|
||||
"@TypeAnn()",
|
||||
"foo"
|
||||
)
|
||||
|
||||
checkTypeAnnotation(
|
||||
Kotlin::field.javaField!!.annotatedType,
|
||||
"class java.lang.String",
|
||||
"@ImplicitReturn\$TypeAnn()",
|
||||
"@TypeAnn()",
|
||||
"foo"
|
||||
)
|
||||
|
||||
|
||||
+6
-8
@@ -12,14 +12,12 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE_USE)
|
||||
@interface TypeAnn {}
|
||||
|
||||
public class ImplicitReturn {
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE_USE)
|
||||
public @ interface TypeAnn {}
|
||||
|
||||
@ImplicitReturn.TypeAnn
|
||||
@TypeAnn
|
||||
public String bar() {
|
||||
return "OK";
|
||||
}
|
||||
@@ -47,14 +45,14 @@ fun box(): String {
|
||||
checkTypeAnnotation(
|
||||
Kotlin::foo.javaMethod!!.annotatedReturnType,
|
||||
"class java.lang.String",
|
||||
"@ImplicitReturn\$TypeAnn()",
|
||||
"@TypeAnn()",
|
||||
"foo"
|
||||
)
|
||||
|
||||
checkTypeAnnotation(
|
||||
Kotlin::field.javaField!!.annotatedType,
|
||||
"class java.lang.String",
|
||||
"@ImplicitReturn\$TypeAnn()",
|
||||
"@TypeAnn()",
|
||||
"foo"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user