Remove tests on kotlin-annotations-android
#KT-44815
This commit is contained in:
-18
@@ -1484,24 +1484,6 @@ public class FirTypeEnhancementTestGenerated extends AbstractFirTypeEnhancementT
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractFirTypeEnhancementTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("StableName.java")
|
||||
public void testStableName() throws Exception {
|
||||
runTest("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
-63
@@ -132,67 +132,4 @@ public class OwnFirTypeEnhancementTestGenerated extends AbstractOwnFirTypeEnhanc
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/enhancement/mapping"), Pattern.compile("^(.+)\\.java$"), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractOwnFirTypeEnhancementTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("DefaultEnum.java")
|
||||
public void testDefaultEnum() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/DefaultEnum.java");
|
||||
}
|
||||
|
||||
@TestMetadata("DefaultLongLiteral.java")
|
||||
public void testDefaultLongLiteral() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/DefaultLongLiteral.java");
|
||||
}
|
||||
|
||||
@TestMetadata("DefaultNull.java")
|
||||
public void testDefaultNull() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/DefaultNull.java");
|
||||
}
|
||||
|
||||
@TestMetadata("DefaultNullAndParameter.java")
|
||||
public void testDefaultNullAndParameter() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/DefaultNullAndParameter.java");
|
||||
}
|
||||
|
||||
@TestMetadata("DefaultParameter.java")
|
||||
public void testDefaultParameter() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/DefaultParameter.java");
|
||||
}
|
||||
|
||||
@TestMetadata("EmptyParameterName.java")
|
||||
public void testEmptyParameterName() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/EmptyParameterName.java");
|
||||
}
|
||||
|
||||
@TestMetadata("ReorderedParameterNames.java")
|
||||
public void testReorderedParameterNames() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/ReorderedParameterNames.java");
|
||||
}
|
||||
|
||||
@TestMetadata("SameParameterName.java")
|
||||
public void testSameParameterName() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/SameParameterName.java");
|
||||
}
|
||||
|
||||
@TestMetadata("SpecialCharsParameterName.java")
|
||||
public void testSpecialCharsParameterName() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/SpecialCharsParameterName.java");
|
||||
}
|
||||
|
||||
@TestMetadata("StaticMethodWithDefaultValue.java")
|
||||
public void testStaticMethodWithDefaultValue() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/StaticMethodWithDefaultValue.java");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-3
@@ -65,9 +65,6 @@ abstract class AbstractFirTypeEnhancementTest : KtUsefulTestCase() {
|
||||
|
||||
private fun createEnvironment(content: String): KotlinCoreEnvironment {
|
||||
val classpath = mutableListOf(getAnnotationsJar(), ForTestCompileRuntime.runtimeJarForTests())
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(content, "ANDROID_ANNOTATIONS")) {
|
||||
classpath.add(ForTestCompileRuntime.androidAnnotationsForTests())
|
||||
}
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(content, "JVM_ANNOTATIONS")) {
|
||||
classpath.add(ForTestCompileRuntime.jvmAnnotationsForTests())
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
Most FIR enhancement tests use compiler/testData/loadJava/compilerJava
|
||||
Most FIR enhancement tests use compiler/testData/loadJava/compiledJava
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
public/*package*/ open class A : R|kotlin/Any| {
|
||||
public open fun a(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(HELLO)) arg: R|ft<@FlexibleNullability Signs, Signs?>!| = R|/Signs.HELLO|): R|ft<@FlexibleNullability Signs, Signs?>!|
|
||||
|
||||
public open fun bar(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(X)) arg: R|ft<@FlexibleNullability Signs, Signs?>!| = R|/Signs.X|): R|ft<@FlexibleNullability Signs, Signs?>!|
|
||||
|
||||
public open fun baz(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(NOT_ENTRY_EITHER)) arg: R|ft<@FlexibleNullability Signs, Signs?>!|): R|ft<@FlexibleNullability Signs, Signs?>!|
|
||||
|
||||
public open fun bam(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(NOT_ENTRY_EITHER)) arg: R|ft<@FlexibleNullability Mixed, Mixed?>!| = R|/Mixed.NOT_ENTRY_EITHER|): R|ft<@FlexibleNullability Mixed, Mixed?>!|
|
||||
|
||||
public/*package*/ constructor(): R|A|
|
||||
|
||||
}
|
||||
public final enum class Mixed : R|kotlin/Enum<ft<@FlexibleNullability Mixed, Mixed?>!>| {
|
||||
public final static enum entry NOT_ENTRY_EITHER: R|@FlexibleNullability Mixed|
|
||||
public final static fun values(): R|kotlin/Array<Mixed>| {
|
||||
}
|
||||
|
||||
public final static fun valueOf(value: R|kotlin/String|): R|Mixed| {
|
||||
}
|
||||
|
||||
}
|
||||
public final enum class Signs : R|kotlin/Enum<ft<@FlexibleNullability Signs, Signs?>!>| {
|
||||
public final static enum entry HELLO: R|@FlexibleNullability Signs|
|
||||
public final static enum entry WORLD: R|@FlexibleNullability Signs|
|
||||
public final static field X: R|ft<@FlexibleNullability Signs, Signs?>!|
|
||||
|
||||
public final static fun values(): R|kotlin/Array<Signs>| {
|
||||
}
|
||||
|
||||
public final static fun valueOf(value: R|kotlin/String|): R|Signs| {
|
||||
}
|
||||
|
||||
}
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
// FILE: Signs.java
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
public enum Signs {
|
||||
HELLO,
|
||||
WORLD;
|
||||
|
||||
public static final Signs X;
|
||||
public static final class NOT_ENTRY_EITHER {}
|
||||
}
|
||||
|
||||
// FILE: Mixed.java
|
||||
public enum Mixed {
|
||||
NOT_ENTRY_EITHER;
|
||||
|
||||
public static final class NOT_ENTRY_EITHER {}
|
||||
}
|
||||
|
||||
// FILE: A.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public Signs a(@DefaultValue("HELLO") Signs arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Signs bar(@DefaultValue("X") Signs arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Signs baz(@DefaultValue("NOT_ENTRY_EITHER") Signs arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Mixed bam(@DefaultValue("NOT_ENTRY_EITHER") Mixed arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
public open class A : R|kotlin/Any| {
|
||||
public open fun first(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(0x1F)) value: R|ft<@FlexibleNullability kotlin/Long, kotlin/Long?>!| = Long(31)): R|kotlin/Unit|
|
||||
|
||||
public open fun second(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(0X1F)) value: R|ft<@FlexibleNullability kotlin/Long, kotlin/Long?>!| = Long(31)): R|kotlin/Unit|
|
||||
|
||||
public open fun third(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(0b1010)) value: R|ft<@FlexibleNullability kotlin/Long, kotlin/Long?>!| = Long(10)): R|kotlin/Unit|
|
||||
|
||||
public open fun fourth(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(0B1010)) value: R|ft<@FlexibleNullability kotlin/Long, kotlin/Long?>!| = Long(10)): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|A|
|
||||
|
||||
}
|
||||
public open class B : R|kotlin/Any| {
|
||||
public open fun first(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(0x)) value: R|ft<@FlexibleNullability kotlin/Long, kotlin/Long?>!|): R|kotlin/Unit|
|
||||
|
||||
public open fun second(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(0xZZ)) value: R|ft<@FlexibleNullability kotlin/Long, kotlin/Long?>!|): R|kotlin/Unit|
|
||||
|
||||
public open fun third(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(0b)) value: R|ft<@FlexibleNullability kotlin/Long, kotlin/Long?>!|): R|kotlin/Unit|
|
||||
|
||||
public open fun fourth(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(0B1234)) value: R|ft<@FlexibleNullability kotlin/Long, kotlin/Long?>!|): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|B|
|
||||
|
||||
}
|
||||
Vendored
-36
@@ -1,36 +0,0 @@
|
||||
// FILE: A.java
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void first(@DefaultValue("0x1F") Long value) {
|
||||
}
|
||||
|
||||
public void second(@DefaultValue("0X1F") Long value) {
|
||||
}
|
||||
|
||||
public void third(@DefaultValue("0b1010") Long value) {
|
||||
}
|
||||
|
||||
public void fourth(@DefaultValue("0B1010") Long value) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class B {
|
||||
public void first(@DefaultValue("0x") Long value) {
|
||||
}
|
||||
|
||||
public void second(@DefaultValue("0xZZ") Long value) {
|
||||
}
|
||||
|
||||
public void third(@DefaultValue("0b") Long value) {
|
||||
}
|
||||
|
||||
public void fourth(@DefaultValue("0B1234") Long value) {
|
||||
}
|
||||
}
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
public open class A : R|kotlin/Any| {
|
||||
public open fun foo(@R|kotlin/annotations/jvm/internal/DefaultNull|() x: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| = Null(null)): R|kotlin/Unit|
|
||||
|
||||
public open fun bar(@R|kotlin/annotations/jvm/internal/DefaultNull|() x: R|kotlin/Int| = Null(null)): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|A|
|
||||
|
||||
}
|
||||
public open class B<T : R|ft<kotlin/Any, kotlin/Any?>!|> : R|kotlin/Any| {
|
||||
public open fun foo(@R|kotlin/annotations/jvm/internal/DefaultNull|() t: R|ft<@FlexibleNullability T, T?>!| = Null(null)): R|kotlin/Unit|
|
||||
|
||||
public constructor<T : R|ft<kotlin/Any, kotlin/Any?>!|>(): R|B<T>|
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
// FILE: A.java
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void foo(@DefaultNull Integer x) {}
|
||||
public void bar(@DefaultNull int x) {}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class B<T> {
|
||||
public void foo(@DefaultNull T t) { }
|
||||
}
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
public open class A : R|kotlin/Any| {
|
||||
public open fun foo(@R|kotlin/annotations/jvm/internal/DefaultNull|() i: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| = Null(null)): R|kotlin/Unit|
|
||||
|
||||
public open fun bar(@R|kotlin/annotations/jvm/internal/DefaultNull|() a: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| = Null(null)): R|kotlin/Unit|
|
||||
|
||||
public open fun bam(@R|kotlin/annotations/jvm/internal/DefaultNull|() a: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| = Null(null)): R|kotlin/Unit|
|
||||
|
||||
public open fun baz(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(42)) a: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| = Int(42)): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|A|
|
||||
|
||||
}
|
||||
public abstract interface AInt : R|kotlin/Any| {
|
||||
public abstract fun foo(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(42)) i: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| = Int(42)): R|kotlin/Unit|
|
||||
|
||||
public abstract fun bar(@R|kotlin/annotations/jvm/internal/DefaultNull|() a: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| = Null(null)): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public open class B : R|A| {
|
||||
public open fun foo(i: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!|): R|kotlin/Unit|
|
||||
|
||||
public open fun bar(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(42)) a: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| = Int(42)): R|kotlin/Unit|
|
||||
|
||||
public open fun bam(@R|kotlin/annotations/jvm/internal/DefaultNull|() @R|kotlin/annotations/jvm/internal/DefaultValue|(String(42)) a: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| = Int(42)): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|B|
|
||||
|
||||
}
|
||||
public open class C : R|A|, R|AInt| {
|
||||
public constructor(): R|C|
|
||||
|
||||
}
|
||||
Vendored
-38
@@ -1,38 +0,0 @@
|
||||
// FILE: A.java
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void foo(@DefaultNull Integer i) {}
|
||||
|
||||
public void bar(@DefaultNull Integer a) {}
|
||||
|
||||
public void bam(@DefaultNull Integer a) {}
|
||||
|
||||
public void baz(@DefaultValue("42") Integer a) {}
|
||||
}
|
||||
|
||||
// FILE: AInt.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public interface AInt {
|
||||
public void foo(@DefaultValue("42") Integer i) {}
|
||||
public void bar(@DefaultNull Integer a) {}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class B extends A {
|
||||
public void foo(Integer i) {}
|
||||
|
||||
public void bar(@DefaultValue("42") Integer a) {}
|
||||
|
||||
public void bam(@DefaultNull @DefaultValue("42") Integer a) {}
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
public class C extends A implements AInt {
|
||||
}
|
||||
|
||||
Vendored
-14
@@ -1,14 +0,0 @@
|
||||
public/*package*/ open class A : R|kotlin/Any| {
|
||||
public open fun first(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(hello)) value: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = String(hello)): R|kotlin/Unit|
|
||||
|
||||
public open fun second(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(first)) a: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = String(first), @R|kotlin/annotations/jvm/internal/DefaultValue|(String(second)) b: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = String(second)): R|kotlin/Unit|
|
||||
|
||||
public open fun third(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(first)) a: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = String(first), b: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit|
|
||||
|
||||
public open fun fourth(first: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, @R|kotlin/annotations/jvm/internal/DefaultValue|(String(second)) second: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = String(second)): R|kotlin/Unit|
|
||||
|
||||
public open fun wrong(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(hello)) i: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!|): R|kotlin/Unit|
|
||||
|
||||
public/*package*/ constructor(): R|A|
|
||||
|
||||
}
|
||||
Vendored
-23
@@ -1,23 +0,0 @@
|
||||
// FILE: A.java
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public void first(@DefaultValue("hello") String value) {
|
||||
}
|
||||
|
||||
public void second(@DefaultValue("first") String a, @DefaultValue("second") String b) {
|
||||
}
|
||||
|
||||
public void third(@DefaultValue("first") String a, String b) {
|
||||
}
|
||||
|
||||
public void fourth(String first, @DefaultValue("second") String second) {
|
||||
}
|
||||
|
||||
public void wrong(@DefaultValue("hello") Integer i) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
public/*package*/ open class A : R|kotlin/Any| {
|
||||
public open fun emptyName(@R|kotlin/annotations/jvm/internal/ParameterName|(String()) first: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, @R|kotlin/annotations/jvm/internal/ParameterName|(String(ok)) second: R|kotlin/Int|): R|kotlin/Unit|
|
||||
|
||||
public open fun missingName(@R|kotlin/annotations/jvm/internal/ParameterName|() first: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit|
|
||||
|
||||
public open fun numberName(@R|kotlin/annotations/jvm/internal/ParameterName|(Int(42)) first: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit|
|
||||
|
||||
public/*package*/ constructor(): R|A|
|
||||
|
||||
}
|
||||
Vendored
-16
@@ -1,16 +0,0 @@
|
||||
// FILE: A.java
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public void emptyName(@ParameterName("") String first, @ParameterName("ok") int second) {
|
||||
}
|
||||
|
||||
public void missingName(@ParameterName() String first) {
|
||||
}
|
||||
|
||||
public void numberName(@ParameterName(42) String first) {
|
||||
}
|
||||
}
|
||||
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
public open class A : R|kotlin/Any| {
|
||||
public open fun connect(@R|kotlin/annotations/jvm/internal/ParameterName|(String(host)) host: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, @R|kotlin/annotations/jvm/internal/ParameterName|(String(port)) port: R|kotlin/Int|): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|A|
|
||||
|
||||
}
|
||||
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
|
||||
// FILE: A.java
|
||||
// ANDROID_ANNOTATIONS
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void connect(@ParameterName("host") String host, @ParameterName("port") int port) {
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
public open class A : R|kotlin/Any| {
|
||||
public open fun same(@R|kotlin/annotations/jvm/internal/ParameterName|(String(ok)) first: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, @R|kotlin/annotations/jvm/internal/ParameterName|(String(ok)) second: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|A|
|
||||
|
||||
}
|
||||
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
|
||||
// FILE: A.java
|
||||
// ANDROID_ANNOTATIONS
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void same(@ParameterName("ok") String first, @ParameterName("ok") String second) {
|
||||
}
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
public open class A : R|kotlin/Any| {
|
||||
public open fun dollarName(@R|kotlin/annotations/jvm/internal/ParameterName|(String($)) host: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit|
|
||||
|
||||
public open fun numberName(@R|kotlin/annotations/jvm/internal/ParameterName|(String(42)) field: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|A|
|
||||
|
||||
}
|
||||
compiler/fir/analysis-tests/testData/enhancement/signatureAnnotations/SpecialCharsParameterName.java
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
// FILE: A.java
|
||||
// ANDROID_ANNOTATIONS
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
import kotlin.internal.*;
|
||||
|
||||
public class A {
|
||||
public void dollarName(@ParameterName("$") String host) {
|
||||
}
|
||||
|
||||
public void numberName(@ParameterName("42") String field) {
|
||||
}
|
||||
}
|
||||
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
public/*package*/ open class A : R|kotlin/Any| {
|
||||
public open static fun withDefault(@R|kotlin/annotations/jvm/internal/DefaultValue|(String(OK)) arg: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = String(OK)): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|
|
||||
|
||||
public/*package*/ constructor(): R|A|
|
||||
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
// FILE: A.java
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public static String withDefault(@DefaultValue("OK") String arg) {
|
||||
return arg;
|
||||
}
|
||||
}
|
||||
|
||||
-78
@@ -16428,42 +16428,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultEnum.kt")
|
||||
public void testDefaultEnum() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultLongLiteral.kt")
|
||||
public void testDefaultLongLiteral() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultLongLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultNull.kt")
|
||||
public void testDefaultNull() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNull.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultNullAndParameter.kt")
|
||||
public void testDefaultNullAndParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNullAndParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultParameter.kt")
|
||||
public void testDefaultParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("emptyParameterName.kt")
|
||||
public void testEmptyParameterName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/emptyParameterName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("notNullVarargOverride.kt")
|
||||
public void testNotNullVarargOverride() throws Exception {
|
||||
@@ -16475,48 +16439,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
public void testNullableVarargOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/nullableVarargOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overridesDefaultValue.kt")
|
||||
public void testOverridesDefaultValue() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesDefaultValue.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overridesParameterName.kt")
|
||||
public void testOverridesParameterName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesParameterName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reorderedParameterNames.kt")
|
||||
public void testReorderedParameterNames() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/reorderedParameterNames.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("sameParameterName.kt")
|
||||
public void testSameParameterName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/sameParameterName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCharsParameterName.kt")
|
||||
public void testSpecialCharsParameterName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/specialCharsParameterName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("stableParameterName.kt")
|
||||
public void testStableParameterName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/stableParameterName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticMethodWithDefaultValue.kt")
|
||||
public void testStaticMethodWithDefaultValue() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/staticMethodWithDefaultValue.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
-88
@@ -37307,94 +37307,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class SignatureAnnotations {
|
||||
@Test
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultAndNamedCombination.kt")
|
||||
public void testDefaultAndNamedCombination() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultAndNamedCombination.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultBoxTypes.kt")
|
||||
public void testDefaultBoxTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultBoxTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultEnumType.kt")
|
||||
public void testDefaultEnumType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultEnumType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultLongLiteral.kt")
|
||||
public void testDefaultLongLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultLongLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultMultipleParams.kt")
|
||||
public void testDefaultMultipleParams() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultMultipleParams.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultNull.kt")
|
||||
public void testDefaultNull() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNull.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultNullableBoxTypes.kt")
|
||||
public void testDefaultNullableBoxTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNullableBoxTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultOverrides.kt")
|
||||
public void testDefaultOverrides() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultPrimitiveTypes.kt")
|
||||
public void testDefaultPrimitiveTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultPrimitiveTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultValueInConstructor.kt")
|
||||
public void testDefaultValueInConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultValueInConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultWithJavaBase.kt")
|
||||
public void testDefaultWithJavaBase() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithJavaBase.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultWithKotlinBase.kt")
|
||||
public void testDefaultWithKotlinBase() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithKotlinBase.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reorderedParameterNames.kt")
|
||||
public void testReorderedParameterNames() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/smap")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
-5
@@ -95,11 +95,6 @@ public class ForTestCompileRuntime {
|
||||
return assertExists(new File("dist/kotlinc/lib/kotlin-annotations-jvm.jar"));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static File androidAnnotationsForTests() {
|
||||
return assertExists(new File("dist/kotlinc/lib/kotlin-annotations-android.jar"));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static File assertExists(@NotNull File file) {
|
||||
if (!file.exists()) {
|
||||
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public int first(
|
||||
@ParameterName("first") @DefaultValue("42") int a,
|
||||
@ParameterName("second") @DefaultValue("1") int b
|
||||
) {
|
||||
return 100 * a + b;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
if (a.first() != 100 * 42 + 1) {
|
||||
return "FAIL 1"
|
||||
}
|
||||
|
||||
if (a.first(second = 2) != 100 * 42 + 2) {
|
||||
return "FAIL 2"
|
||||
}
|
||||
|
||||
if (a.first(first = 2) != 100 * 2 + 1) {
|
||||
return "FAIL 3"
|
||||
}
|
||||
|
||||
if (a.first(second = 2, first = 5) != 100 * 5 + 2) {
|
||||
return "FAIL 4"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
|
||||
public Integer a(@DefaultValue("42") Integer arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Float b(@DefaultValue("42.5") Float arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Boolean c(@DefaultValue("true") Boolean arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Byte d(@DefaultValue("42") Byte arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Character e(@DefaultValue("o") Character arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Double f(@DefaultValue("1e12") Double arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Long g(@DefaultValue("42424242424242") Long arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Short h(@DefaultValue("123") Short arg) {
|
||||
return arg;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
|
||||
if (a.a() != 42) {
|
||||
return "FAIL Int: ${a.a()}"
|
||||
}
|
||||
|
||||
if (a.b() != 42.5f) {
|
||||
return "FAIL Float: ${a.b()}"
|
||||
}
|
||||
|
||||
if (!a.c()) {
|
||||
return "FAIL Boolean: ${a.c()}"
|
||||
}
|
||||
|
||||
if (a.d() != 42.toByte()) {
|
||||
return "FAIL Byte: ${a.d()}"
|
||||
}
|
||||
|
||||
if (a.e() != 'o') {
|
||||
return "FAIL Char: ${a.e()}"
|
||||
}
|
||||
|
||||
if (a.f() != 1e12) {
|
||||
return "FAIl Double: ${a.f()}"
|
||||
}
|
||||
|
||||
if (a.g() != 42424242424242) {
|
||||
return "FAIL Long: ${a.g()}"
|
||||
}
|
||||
|
||||
if (a.h() != 123.toShort()) {
|
||||
return "FAIL Short: ${a.h()}"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: Signs.java
|
||||
|
||||
public enum Signs {
|
||||
HELLO,
|
||||
WORLD;
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
enum class B {
|
||||
X,
|
||||
Y;
|
||||
}
|
||||
|
||||
// FILE: A.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public Signs a(@DefaultValue("HELLO") Signs arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public B b(@DefaultValue("Y") B arg) {
|
||||
return arg;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
if (a.a() != Signs.HELLO) {
|
||||
return "FAIL: enums Java"
|
||||
}
|
||||
|
||||
if (a.b() != B.Y) {
|
||||
return "FAIL: enums Kotlin"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public Long first(@DefaultValue("0x1F") Long value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Long second(@DefaultValue("0X1F") Long value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Long third(@DefaultValue("0b1010") Long value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Long fourth(@DefaultValue("0B1010") Long value) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
|
||||
if (a.first() != 0x1F.toLong()) {
|
||||
return "FAIL 1"
|
||||
}
|
||||
|
||||
if (a.second() != 0x1F.toLong()) {
|
||||
return "FAIL 2"
|
||||
}
|
||||
|
||||
if (a.third() != 0b1010.toLong()) {
|
||||
return "FAIL 3"
|
||||
}
|
||||
|
||||
if (a.fourth() != 0b1010.toLong()) {
|
||||
return "FAIL 4"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public int first(@DefaultValue("1") int a, @DefaultValue("2") int b) {
|
||||
return 100 * a + b;
|
||||
}
|
||||
|
||||
public int second(int a, @DefaultValue("42") int b) {
|
||||
return 100 * a + b;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
|
||||
if (a.first() != 102) {
|
||||
return "FAIL 1"
|
||||
}
|
||||
|
||||
if (a.first(2) != 202) {
|
||||
return "FAIL 2"
|
||||
}
|
||||
|
||||
if (a.first(3, 4) != 304) {
|
||||
return "FAIL 3"
|
||||
}
|
||||
|
||||
if (a.second(7, 8) != 708) {
|
||||
return "FAIL 4"
|
||||
}
|
||||
|
||||
if (a.second(1) != 142) {
|
||||
return "FAIL 5"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public Integer foo(@DefaultNull Integer x) { return x; }
|
||||
public Integer bar(@DefaultNull Integer x) { return x; }
|
||||
|
||||
public Integer baz(@DefaultValue("42") Integer x) { return x; }
|
||||
}
|
||||
|
||||
// FILE: AInt.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public interface AInt {
|
||||
public Integer foo(@DefaultValue("42") Integer x);
|
||||
public Integer bar(@DefaultNull Integer x);
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
|
||||
public class B extends A {
|
||||
public Integer foo(Integer x) { return x; }
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class C extends A {
|
||||
public Integer foo(@DefaultValue("42") Integer x) { return x; }
|
||||
|
||||
public Integer baz(@DefaultNull Integer x) { return x; }
|
||||
}
|
||||
|
||||
// FILE: D.java
|
||||
|
||||
public class D extends A implements AInt {
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
if (A().foo() != null) return "FAIL 0"
|
||||
|
||||
if (B().foo() != null) return "FAIL 1"
|
||||
if (B().bar() != null) return "FAIL 2"
|
||||
|
||||
if (C().foo() != null) return "FAIL 3"
|
||||
if (C().baz() != 42) return "FAIL 4"
|
||||
|
||||
if (D().baz() != 42) return "FAIL 5"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
public class A {
|
||||
|
||||
public Integer a(@Nullable @DefaultValue("42") Integer arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Float b(@Nullable @DefaultValue("42.5") Float arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Boolean c(@Nullable @DefaultValue("true") Boolean arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Byte d(@Nullable @DefaultValue("42") Byte arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Character e(@Nullable @DefaultValue("o") Character arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Double f(@Nullable @DefaultValue("1e12") Double arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Long g(@Nullable @DefaultValue("42424242424242") Long arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Short h(@Nullable @DefaultValue("123") Short arg) {
|
||||
return arg;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
|
||||
if (a.a() != 42) {
|
||||
return "FAIL Int: ${a.a()}"
|
||||
}
|
||||
|
||||
if (a.b() != 42.5f) {
|
||||
return "FAIL Float: ${a.b()}"
|
||||
}
|
||||
|
||||
if (!a.c()) {
|
||||
return "FAIL Boolean: ${a.c()}"
|
||||
}
|
||||
|
||||
if (a.d() != 42.toByte()) {
|
||||
return "FAIL Byte: ${a.d()}"
|
||||
}
|
||||
|
||||
if (a.e() != 'o') {
|
||||
return "FAIL Char: ${a.e()}"
|
||||
}
|
||||
|
||||
if (a.f() != 1e12) {
|
||||
return "FAIl Double: ${a.f()}"
|
||||
}
|
||||
|
||||
if (a.g() != 42424242424242) {
|
||||
return "FAIL Long: ${a.g()}"
|
||||
}
|
||||
|
||||
if (a.h() != 123.toShort()) {
|
||||
return "FAIL Short: ${a.h()}"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public int first(@DefaultValue("42") int a) {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
class B extends A {
|
||||
public int first(int a) {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
val b = B()
|
||||
val ab: A = B()
|
||||
|
||||
if (a.first() != 42) {
|
||||
return "FAIL 1"
|
||||
}
|
||||
if (b.first() != 42) {
|
||||
return "FAIL 2"
|
||||
}
|
||||
if (ab.first() != 42) {
|
||||
return "FAIL 4"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
|
||||
public int a(@DefaultValue("42") int arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public float b(@DefaultValue("42.5") float arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public boolean c(@DefaultValue("true") boolean arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public byte d(@DefaultValue("42") byte arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public char e(@DefaultValue("o") char arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public double f(@DefaultValue("1e12") double arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public String g(@DefaultValue("hello") String arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public long h(@DefaultValue("42424242424242") long arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public short i(@DefaultValue("123") short arg) {
|
||||
return arg;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
|
||||
if (a.a() != 42) {
|
||||
return "FAIL Int: ${a.a()}"
|
||||
}
|
||||
|
||||
if (a.b() != 42.5f) {
|
||||
return "FAIL Float: ${a.b()}"
|
||||
}
|
||||
|
||||
if (!a.c()) {
|
||||
return "FAIL Boolean: ${a.c()}"
|
||||
}
|
||||
|
||||
if (a.d() != 42.toByte()) {
|
||||
return "FAIL Byte: ${a.d()}"
|
||||
}
|
||||
|
||||
if (a.e() != 'o') {
|
||||
return "FAIL Char: ${a.e()}"
|
||||
}
|
||||
|
||||
if (a.f() != 1e12) {
|
||||
return "FAIl Double: ${a.f()}"
|
||||
}
|
||||
|
||||
if (a.g() != "hello") {
|
||||
return "FAIL String: ${a.g()}"
|
||||
}
|
||||
|
||||
if (a.h() != 42424242424242) {
|
||||
return "FAIL Long: ${a.h()}"
|
||||
}
|
||||
|
||||
if (a.i() != 123.toShort()) {
|
||||
return "FAIL Short: ${a.i()}"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public String x;
|
||||
public A(@DefaultValue("OK") String hello) {
|
||||
x = hello;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
|
||||
val b = object : A() {
|
||||
}
|
||||
|
||||
val c = object : A() {
|
||||
fun hello() = x
|
||||
}
|
||||
|
||||
if (a.x != "OK") {
|
||||
return "FAIL 1"
|
||||
}
|
||||
|
||||
if (b.x != "OK") {
|
||||
return "FAIL 2"
|
||||
}
|
||||
|
||||
if (c.hello() != "OK") {
|
||||
return "FAIL 3"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public int x(@DefaultValue("42") int x) {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
class B : A() {
|
||||
override fun x(x: Int): Int = x + 1
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
fun box(): String {
|
||||
if (B().x() != 43) {
|
||||
return "FAIL"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// FILE: A.kt
|
||||
open class A {
|
||||
open fun x(x: Int = foo()) = x
|
||||
private fun foo() = 42
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
public class B extends A {
|
||||
public int x(int i) {
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
fun box(): String {
|
||||
if (B().x() != 43) {
|
||||
return "FAIL"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public int connect(@ParameterName("host") int host, @ParameterName("port") int port) {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
val test = A()
|
||||
|
||||
if (test.connect(host = 42, port = 8080) != 42) {
|
||||
return "FAIL 1"
|
||||
}
|
||||
|
||||
if (test.connect(port = 1234, host = 5678) != 5678) {
|
||||
return "FAIL 2"
|
||||
}
|
||||
|
||||
if (test.connect(9876, 4321) != 9876) {
|
||||
return "FAIL 3"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
-67
@@ -1,67 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: Signs.java
|
||||
|
||||
public enum Signs {
|
||||
HELLO,
|
||||
WORLD;
|
||||
|
||||
public static final Signs X;
|
||||
public static final class NOT_ENTRY_EITHER {}
|
||||
}
|
||||
|
||||
// FILE: Mixed.java
|
||||
public enum Mixed {
|
||||
NOT_ENTRY_EITHER;
|
||||
|
||||
public static final class NOT_ENTRY_EITHER {}
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
enum class B {
|
||||
X,
|
||||
Y;
|
||||
}
|
||||
|
||||
// FILE: A.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public Signs a(@DefaultValue("HELLO") Signs arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public B b(@DefaultValue("Y") B arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public void foooo(@DefaultValue("ok") B arg) {
|
||||
}
|
||||
|
||||
public Signs bar(@DefaultValue("X") Signs arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Signs baz(@DefaultValue("NOT_ENTRY_EITHER") Signs arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Mixed bam(@DefaultValue("NOT_ENTRY_EITHER") Mixed arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun test(){
|
||||
val a = A()
|
||||
a.a()
|
||||
a.a(Signs.HELLO)
|
||||
a.b()
|
||||
a.b(B.X)
|
||||
a.<!INAPPLICABLE_CANDIDATE!>foooo<!>()
|
||||
a.foooo(B.Y)
|
||||
a.bar()
|
||||
a.<!INAPPLICABLE_CANDIDATE!>baz<!>()
|
||||
|
||||
a.bam()
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: Signs.java
|
||||
|
||||
public enum Signs {
|
||||
HELLO,
|
||||
WORLD;
|
||||
|
||||
public static final Signs X;
|
||||
public static final class NOT_ENTRY_EITHER {}
|
||||
}
|
||||
|
||||
// FILE: Mixed.java
|
||||
public enum Mixed {
|
||||
NOT_ENTRY_EITHER;
|
||||
|
||||
public static final class NOT_ENTRY_EITHER {}
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
enum class B {
|
||||
X,
|
||||
Y;
|
||||
}
|
||||
|
||||
// FILE: A.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public Signs a(@DefaultValue("HELLO") Signs arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public B b(@DefaultValue("Y") B arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public void foooo(@DefaultValue("ok") B arg) {
|
||||
}
|
||||
|
||||
public Signs bar(@DefaultValue("X") Signs arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Signs baz(@DefaultValue("NOT_ENTRY_EITHER") Signs arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public Mixed bam(@DefaultValue("NOT_ENTRY_EITHER") Mixed arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun test(){
|
||||
val a = A()
|
||||
a.a()
|
||||
a.a(Signs.HELLO)
|
||||
a.b()
|
||||
a.b(B.X)
|
||||
a.foooo(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.foooo(B.Y)
|
||||
a.bar(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.baz(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
|
||||
a.bam(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public/*package*/ open class A {
|
||||
public/*package*/ constructor A()
|
||||
public open fun a(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "HELLO") arg: Signs! = ...): Signs!
|
||||
public open fun b(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "Y") arg: B! = ...): B!
|
||||
public open fun bam(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "NOT_ENTRY_EITHER") arg: Mixed!): Mixed!
|
||||
public open fun bar(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "X") arg: Signs!): Signs!
|
||||
public open fun baz(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "NOT_ENTRY_EITHER") arg: Signs!): Signs!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun foooo(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "ok") arg: B!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final enum class B : kotlin.Enum<B> {
|
||||
enum entry X
|
||||
|
||||
enum entry Y
|
||||
|
||||
private constructor B()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: B): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<B!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): B
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<B>
|
||||
}
|
||||
|
||||
public final enum class Mixed : kotlin.Enum<Mixed!> {
|
||||
public constructor Mixed()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Mixed!): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Mixed!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class NOT_ENTRY_EITHER {
|
||||
public constructor NOT_ENTRY_EITHER()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Mixed
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<Mixed>
|
||||
}
|
||||
|
||||
public final enum class Signs : kotlin.Enum<Signs!> {
|
||||
enum entry HELLO
|
||||
|
||||
enum entry WORLD
|
||||
|
||||
public constructor Signs()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: Signs!): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<Signs!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class NOT_ENTRY_EITHER {
|
||||
public constructor NOT_ENTRY_EITHER()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final val X: Signs!
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Signs
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<Signs>
|
||||
}
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void first(@DefaultValue("0x1F") Long value) {
|
||||
}
|
||||
|
||||
public void second(@DefaultValue("0X1F") Long value) {
|
||||
}
|
||||
|
||||
public void third(@DefaultValue("0b1010") Long value) {
|
||||
}
|
||||
|
||||
public void fourth(@DefaultValue("0B1010") Long value) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class B {
|
||||
public void first(@DefaultValue("0x") Long value) {
|
||||
}
|
||||
|
||||
public void second(@DefaultValue("0xZZ") Long value) {
|
||||
}
|
||||
|
||||
public void third(@DefaultValue("0b") Long value) {
|
||||
}
|
||||
|
||||
public void fourth(@DefaultValue("0B1234") Long value) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main(a: A, b: B) {
|
||||
a.first()
|
||||
a.second()
|
||||
a.third()
|
||||
a.fourth()
|
||||
|
||||
b.<!INAPPLICABLE_CANDIDATE!>first<!>()
|
||||
b.<!INAPPLICABLE_CANDIDATE!>second<!>()
|
||||
b.<!INAPPLICABLE_CANDIDATE!>third<!>()
|
||||
b.<!INAPPLICABLE_CANDIDATE!>fourth<!>()
|
||||
}
|
||||
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void first(@DefaultValue("0x1F") Long value) {
|
||||
}
|
||||
|
||||
public void second(@DefaultValue("0X1F") Long value) {
|
||||
}
|
||||
|
||||
public void third(@DefaultValue("0b1010") Long value) {
|
||||
}
|
||||
|
||||
public void fourth(@DefaultValue("0B1010") Long value) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class B {
|
||||
public void first(@DefaultValue("0x") Long value) {
|
||||
}
|
||||
|
||||
public void second(@DefaultValue("0xZZ") Long value) {
|
||||
}
|
||||
|
||||
public void third(@DefaultValue("0b") Long value) {
|
||||
}
|
||||
|
||||
public void fourth(@DefaultValue("0B1234") Long value) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main(a: A, b: B) {
|
||||
a.first()
|
||||
a.second()
|
||||
a.third()
|
||||
a.fourth()
|
||||
|
||||
b.first(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
b.second(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
b.third(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
b.fourth(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
}
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package
|
||||
|
||||
public fun main(/*0*/ a: A, /*1*/ b: B): kotlin.Unit
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun first(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "0x1F") value: kotlin.Long! = ...): kotlin.Unit
|
||||
public open fun fourth(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "0B1010") value: kotlin.Long! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun second(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "0X1F") value: kotlin.Long! = ...): kotlin.Unit
|
||||
public open fun third(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "0b1010") value: kotlin.Long! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class B {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun first(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "0x") value: kotlin.Long!): kotlin.Unit
|
||||
public open fun fourth(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "0B1234") value: kotlin.Long!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun second(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "0xZZ") value: kotlin.Long!): kotlin.Unit
|
||||
public open fun third(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "0b") value: kotlin.Long!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void foo(@DefaultNull Integer x) {}
|
||||
public void bar(@DefaultNull int x) {}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class B<T> {
|
||||
public void foo(@DefaultNull T t) { }
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun test(a: A, first: B<Int>, second: B<Int?>) {
|
||||
a.foo()
|
||||
a.foo(0)
|
||||
|
||||
a.bar()
|
||||
a.bar(0)
|
||||
|
||||
first.foo()
|
||||
first.foo(5)
|
||||
|
||||
second.foo()
|
||||
second.foo(5)
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void foo(@DefaultNull Integer x) {}
|
||||
public void bar(@DefaultNull int x) {}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class B<T> {
|
||||
public void foo(@DefaultNull T t) { }
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun test(a: A, first: B<Int>, second: B<Int?>) {
|
||||
a.foo()
|
||||
a.foo(0)
|
||||
|
||||
a.bar(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.bar(0)
|
||||
|
||||
first.foo()
|
||||
first.foo(5)
|
||||
|
||||
second.foo()
|
||||
second.foo(5)
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ a: A, /*1*/ first: B<kotlin.Int>, /*2*/ second: B<kotlin.Int?>): kotlin.Unit
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open fun bar(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull x: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun foo(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull x: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class B</*0*/ T : kotlin.Any!> {
|
||||
public constructor B</*0*/ T : kotlin.Any!>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun foo(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull t: T! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
// FIR_IDENTICAL
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void foo(@DefaultNull Integer i) {}
|
||||
|
||||
public void bar(@DefaultNull Integer a) {}
|
||||
|
||||
public void bam(@DefaultNull Integer a) {}
|
||||
|
||||
public void baz(@DefaultValue("42") Integer a) {}
|
||||
}
|
||||
|
||||
// FILE: AInt.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public interface AInt {
|
||||
public void foo(@DefaultValue("42") Integer i) {}
|
||||
public void bar(@DefaultNull Integer a) {}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class B extends A {
|
||||
public void foo(Integer i) {}
|
||||
|
||||
public void bar(@DefaultValue("42") Integer a) {}
|
||||
|
||||
public void bam(@DefaultNull @DefaultValue("42") Integer a) {}
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
public class C extends A implements AInt {
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun test(b: B, c: C) {
|
||||
b.foo()
|
||||
b.foo(5)
|
||||
b.bar()
|
||||
b.bar(5)
|
||||
b.bam()
|
||||
b.bam(5)
|
||||
|
||||
c.foo()
|
||||
c.foo(5)
|
||||
c.bar()
|
||||
c.bar(5)
|
||||
c.bam()
|
||||
c.bam(5)
|
||||
c.baz()
|
||||
c.baz(42)
|
||||
}
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ b: B, /*1*/ c: C): kotlin.Unit
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open fun bam(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull a: kotlin.Int! = ...): kotlin.Unit
|
||||
public open fun bar(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull a: kotlin.Int! = ...): kotlin.Unit
|
||||
public open fun baz(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "42") a: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun foo(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull i: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface AInt {
|
||||
public abstract fun bar(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull a: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun foo(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "42") i: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class B : A {
|
||||
public constructor B()
|
||||
public open override /*1*/ fun bam(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull @kotlin.annotations.jvm.internal.DefaultValue(value = "42") a: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*1*/ fun bar(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "42") a: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun baz(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "42") a: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun foo(/*0*/ i: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class C : A, AInt {
|
||||
public constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun bam(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull a: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun bar(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull a: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun baz(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "42") a: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun foo(/*0*/ @kotlin.annotations.jvm.internal.DefaultNull i: kotlin.Int! = ...): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public void first(@DefaultValue("hello") String value) {
|
||||
}
|
||||
|
||||
public void second(@DefaultValue("first") String a, @DefaultValue("second") String b) {
|
||||
}
|
||||
|
||||
public void third(@DefaultValue("first") String a, String b) {
|
||||
}
|
||||
|
||||
public void fourth(String first, @DefaultValue("second") String second) {
|
||||
}
|
||||
|
||||
public void wrong(@DefaultValue("hello") Integer i) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val a = A()
|
||||
|
||||
a.first()
|
||||
a.first("arg")
|
||||
|
||||
a.second()
|
||||
a.second("arg")
|
||||
a.second("first", "second")
|
||||
|
||||
a.<!INAPPLICABLE_CANDIDATE!>third<!>("OK")
|
||||
a.third("first", "second")
|
||||
|
||||
a.<!INAPPLICABLE_CANDIDATE!>fourth<!>()
|
||||
a.fourth("first")
|
||||
a.fourth("first", "second")
|
||||
|
||||
a.<!INAPPLICABLE_CANDIDATE!>wrong<!>()
|
||||
a.wrong(42)
|
||||
}
|
||||
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public void first(@DefaultValue("hello") String value) {
|
||||
}
|
||||
|
||||
public void second(@DefaultValue("first") String a, @DefaultValue("second") String b) {
|
||||
}
|
||||
|
||||
public void third(@DefaultValue("first") String a, String b) {
|
||||
}
|
||||
|
||||
public void fourth(String first, @DefaultValue("second") String second) {
|
||||
}
|
||||
|
||||
public void wrong(@DefaultValue("hello") Integer i) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val a = A()
|
||||
|
||||
a.first()
|
||||
a.first("arg")
|
||||
|
||||
a.second()
|
||||
a.second("arg")
|
||||
a.second("first", "second")
|
||||
|
||||
a.third("OK"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.third("first", "second")
|
||||
|
||||
a.fourth(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.fourth("first")
|
||||
a.fourth("first", "second")
|
||||
|
||||
a.wrong(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.wrong(42)
|
||||
}
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public/*package*/ open class A {
|
||||
public/*package*/ constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun first(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "hello") value: kotlin.String! = ...): kotlin.Unit
|
||||
public open fun fourth(/*0*/ first: kotlin.String!, /*1*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "second") second: kotlin.String! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun second(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "first") a: kotlin.String! = ..., /*1*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "second") b: kotlin.String! = ...): kotlin.Unit
|
||||
public open fun third(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "first") a: kotlin.String! = ..., /*1*/ b: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public open fun wrong(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "hello") i: kotlin.Int!): kotlin.Unit
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public void emptyName(@ParameterName("") String first, @ParameterName("ok") int second) {
|
||||
}
|
||||
|
||||
public void missingName(@ParameterName() String first) {
|
||||
}
|
||||
|
||||
public void numberName(@ParameterName(42) String first) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val test = A()
|
||||
test.emptyName("first", 42)
|
||||
test.<!INAPPLICABLE_CANDIDATE!>emptyName<!>("first", ok = 42)
|
||||
|
||||
test.missingName(`first` = "arg")
|
||||
test.missingName("arg")
|
||||
|
||||
test.numberName("first")
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public void emptyName(@ParameterName("") String first, @ParameterName("ok") int second) {
|
||||
}
|
||||
|
||||
public void missingName(@ParameterName() String first) {
|
||||
}
|
||||
|
||||
public void numberName(@ParameterName(42) String first) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val test = A()
|
||||
test.emptyName("first", 42)
|
||||
test.emptyName("first", <!NAMED_ARGUMENTS_NOT_ALLOWED!>ok<!> = 42)
|
||||
|
||||
test.missingName(<!NAMED_ARGUMENTS_NOT_ALLOWED!>`first`<!> = "arg")
|
||||
test.missingName("arg")
|
||||
|
||||
test.numberName("first")
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public/*package*/ open class A {
|
||||
public/*package*/ constructor A()
|
||||
public open fun emptyName(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "") first: kotlin.String!, /*1*/ @kotlin.annotations.jvm.internal.ParameterName(value = "ok") ok: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun missingName(/*0*/ @kotlin.annotations.jvm.internal.ParameterName first: kotlin.String!): kotlin.Unit
|
||||
public open fun numberName(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = 42) first: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-100
@@ -1,100 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public void first(@DefaultValue("42") int arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
class B {
|
||||
public void first(int arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class C extends A {
|
||||
public void first(@DefaultValue("73") int arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: D.java
|
||||
import kotlin.internal.*;
|
||||
|
||||
class D extends B {
|
||||
public void first(@DefaultValue("37") int arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: E.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class E extends A {
|
||||
public void first(int arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: F.kt
|
||||
open class F {
|
||||
open fun foo(x: String = "0") {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: G.java
|
||||
class G extends F {
|
||||
public void foo(String y) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: K.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public interface K {
|
||||
public void foo(@DefaultValue("1") String x) { }
|
||||
}
|
||||
|
||||
// FILE: L.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public interface L {
|
||||
public void foo(@DefaultValue("1") String x) { }
|
||||
}
|
||||
|
||||
// FILE: M.java
|
||||
public class M implements K, L {
|
||||
public void foo(String x) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun main() {
|
||||
val a = A()
|
||||
val c = C()
|
||||
val d = D()
|
||||
val e = E()
|
||||
|
||||
val ac: A = C()
|
||||
val bd: B = D()
|
||||
|
||||
a.first()
|
||||
c.first()
|
||||
ac.first()
|
||||
|
||||
d.<!INAPPLICABLE_CANDIDATE!>first<!>()
|
||||
bd.<!INAPPLICABLE_CANDIDATE!>first<!>()
|
||||
|
||||
e.first()
|
||||
|
||||
val g = G()
|
||||
g.foo()
|
||||
g.foo("ok")
|
||||
|
||||
val m = M()
|
||||
m.foo()
|
||||
|
||||
}
|
||||
|
||||
-100
@@ -1,100 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public void first(@DefaultValue("42") int arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
class B {
|
||||
public void first(int arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class C extends A {
|
||||
public void first(@DefaultValue("73") int arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: D.java
|
||||
import kotlin.internal.*;
|
||||
|
||||
class D extends B {
|
||||
public void first(@DefaultValue("37") int arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: E.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class E extends A {
|
||||
public void first(int arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: F.kt
|
||||
open class F {
|
||||
open fun foo(x: String = "0") {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: G.java
|
||||
class G extends F {
|
||||
public void foo(String y) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: K.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public interface K {
|
||||
public void foo(@DefaultValue("1") String x) { }
|
||||
}
|
||||
|
||||
// FILE: L.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public interface L {
|
||||
public void foo(@DefaultValue("1") String x) { }
|
||||
}
|
||||
|
||||
// FILE: M.java
|
||||
public class M implements K, L {
|
||||
public void foo(String x) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun main() {
|
||||
val a = A()
|
||||
val c = C()
|
||||
val d = D()
|
||||
val e = E()
|
||||
|
||||
val ac: A = C()
|
||||
val bd: B = D()
|
||||
|
||||
a.first()
|
||||
c.first()
|
||||
ac.first()
|
||||
|
||||
d.first(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
bd.first(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
|
||||
e.first()
|
||||
|
||||
val g = G()
|
||||
g.foo()
|
||||
g.foo("ok")
|
||||
|
||||
val m = M()
|
||||
m.foo()
|
||||
|
||||
}
|
||||
|
||||
-81
@@ -1,81 +0,0 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public/*package*/ open class A {
|
||||
public/*package*/ constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun first(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "42") arg: kotlin.Int = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class B {
|
||||
public/*package*/ constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun first(/*0*/ arg: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class C : A {
|
||||
public/*package*/ constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun first(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "73") arg: kotlin.Int = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class D : B {
|
||||
public/*package*/ constructor D()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun first(/*0*/ @DefaultValue(value = "37") /* annotation class not found */ arg: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class E : A {
|
||||
public/*package*/ constructor E()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun first(/*0*/ arg: kotlin.Int = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class F {
|
||||
public constructor F()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun foo(/*0*/ x: kotlin.String = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class G : F {
|
||||
public/*package*/ constructor G()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun foo(/*0*/ x: kotlin.String = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface K {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun foo(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "1") x: kotlin.String! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface L {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun foo(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "1") x: kotlin.String! = ...): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class M : K, L {
|
||||
public constructor M()
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ fun foo(/*0*/ x: kotlin.String! = ...): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-98
@@ -1,98 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public void call(@ParameterName("foo") String arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class B extends A {
|
||||
public void call(@ParameterName("bar") String arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
|
||||
class C extends A {
|
||||
public void call(String arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: D.kt
|
||||
open class D {
|
||||
open fun call(foo: String) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: E.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class E extends D {
|
||||
public void call(@ParameterName("baz") String bar) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: F.java
|
||||
class F extends D {
|
||||
public void call(String baaam) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: G.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class G {
|
||||
public void foo(String bar, @ParameterName("foo") String baz) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: H.java
|
||||
class H extends G {
|
||||
public void foo(String baz, String bam) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val a = A()
|
||||
val b = B()
|
||||
val c = C()
|
||||
|
||||
a.<!INAPPLICABLE_CANDIDATE!>call<!>(foo = "hello")
|
||||
a.call(arg = "hello")
|
||||
a.call("hello")
|
||||
|
||||
b.<!INAPPLICABLE_CANDIDATE!>call<!>(foo = "hello")
|
||||
b.call(arg = "hello")
|
||||
b.<!INAPPLICABLE_CANDIDATE!>call<!>(bar = "hello")
|
||||
b.call("hello")
|
||||
|
||||
c.<!INAPPLICABLE_CANDIDATE!>call<!>(foo = "hello")
|
||||
c.call(arg = "hello")
|
||||
c.call("hello")
|
||||
|
||||
val e = E()
|
||||
val f = F()
|
||||
|
||||
e.<!INAPPLICABLE_CANDIDATE!>call<!>(foo = "hello")
|
||||
e.call(bar = "hello")
|
||||
e.<!INAPPLICABLE_CANDIDATE!>call<!>(baz = "hello")
|
||||
e.call("hello")
|
||||
|
||||
f.<!INAPPLICABLE_CANDIDATE!>call<!>(foo = "hello")
|
||||
f.call(baaam = "hello")
|
||||
f.call("hello")
|
||||
|
||||
val g = G()
|
||||
val h = H()
|
||||
g.<!INAPPLICABLE_CANDIDATE!>foo<!>("ok", foo = "hohoho")
|
||||
g.foo("ok", "hohoho")
|
||||
h.<!INAPPLICABLE_CANDIDATE!>foo<!>("ok", foo = "hohoho")
|
||||
h.foo("ok", "hohoho")
|
||||
}
|
||||
-98
@@ -1,98 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public void call(@ParameterName("foo") String arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class B extends A {
|
||||
public void call(@ParameterName("bar") String arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
|
||||
class C extends A {
|
||||
public void call(String arg) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: D.kt
|
||||
open class D {
|
||||
open fun call(foo: String) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: E.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class E extends D {
|
||||
public void call(@ParameterName("baz") String bar) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: F.java
|
||||
class F extends D {
|
||||
public void call(String baaam) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: G.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class G {
|
||||
public void foo(String bar, @ParameterName("foo") String baz) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: H.java
|
||||
class H extends G {
|
||||
public void foo(String baz, String bam) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val a = A()
|
||||
val b = B()
|
||||
val c = C()
|
||||
|
||||
a.call(foo = "hello")
|
||||
a.call(<!NAMED_PARAMETER_NOT_FOUND!>arg<!> = "hello"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
a.call("hello")
|
||||
|
||||
b.call(<!NAMED_PARAMETER_NOT_FOUND!>foo<!> = "hello"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
b.call(<!NAMED_PARAMETER_NOT_FOUND!>arg<!> = "hello"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
b.call(bar = "hello")
|
||||
b.call("hello")
|
||||
|
||||
c.call(foo = "hello")
|
||||
c.call(<!NAMED_PARAMETER_NOT_FOUND!>arg<!> = "hello"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
c.call("hello")
|
||||
|
||||
val e = E()
|
||||
val f = F()
|
||||
|
||||
e.call(<!NAMED_PARAMETER_NOT_FOUND!>foo<!> = "hello"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
e.call(<!NAMED_PARAMETER_NOT_FOUND!>bar<!> = "hello"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
e.call(baz = "hello")
|
||||
e.call("hello")
|
||||
|
||||
f.call(foo = "hello")
|
||||
f.call(<!NAMED_PARAMETER_NOT_FOUND!>baaam<!> = "hello"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
f.call("hello")
|
||||
|
||||
val g = G()
|
||||
val h = H()
|
||||
g.foo("ok", <!NAMED_ARGUMENTS_NOT_ALLOWED!>foo<!> = "hohoho")
|
||||
g.foo("ok", "hohoho")
|
||||
h.foo("ok", <!NAMED_ARGUMENTS_NOT_ALLOWED, NAMED_PARAMETER_NOT_FOUND!>foo<!> = "hohoho"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
h.foo("ok", "hohoho")
|
||||
}
|
||||
-67
@@ -1,67 +0,0 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public/*package*/ open class A {
|
||||
public/*package*/ constructor A()
|
||||
public open fun call(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "foo") foo: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class B : A {
|
||||
public/*package*/ constructor B()
|
||||
public open override /*1*/ fun call(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "bar") bar: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class C : A {
|
||||
public/*package*/ constructor C()
|
||||
public open override /*1*/ fun call(/*0*/ foo: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class D {
|
||||
public constructor D()
|
||||
public open fun call(/*0*/ foo: kotlin.String): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class E : D {
|
||||
public/*package*/ constructor E()
|
||||
public open override /*1*/ fun call(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "baz") baz: kotlin.String): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class F : D {
|
||||
public/*package*/ constructor F()
|
||||
public open override /*1*/ fun call(/*0*/ foo: kotlin.String): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class G {
|
||||
public/*package*/ constructor G()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun foo(/*0*/ bar: kotlin.String!, /*1*/ @kotlin.annotations.jvm.internal.ParameterName(value = "foo") foo: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public/*package*/ open class H : G {
|
||||
public/*package*/ constructor H()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun foo(/*0*/ baz: kotlin.String!, /*1*/ bam: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void connect(@ParameterName("host") String host, @ParameterName("port") int port) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val test = A()
|
||||
test.connect("127.0.0.1", 8080)
|
||||
test.connect(host = "127.0.0.1", port = 8080)
|
||||
test.connect(port = 8080, host = "127.0.0.1")
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open fun connect(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "host") host: kotlin.String!, /*1*/ @kotlin.annotations.jvm.internal.ParameterName(value = "port") port: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void same(@ParameterName("ok") String first, @ParameterName("ok") String second) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val test = A()
|
||||
test.same("hello", "world")
|
||||
test.<!INAPPLICABLE_CANDIDATE!>same<!>(ok = "hello", ok = <!UNRESOLVED_REFERENCE!>world<!>)
|
||||
test.<!INAPPLICABLE_CANDIDATE!>same<!>("hello", ok = "world")
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class A {
|
||||
public void same(@ParameterName("ok") String first, @ParameterName("ok") String second) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val test = A()
|
||||
test.same("hello", "world")
|
||||
test.same(ok = "hello", <!ARGUMENT_PASSED_TWICE!>ok<!> = <!UNRESOLVED_REFERENCE!>world<!><!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
test.same("hello", <!ARGUMENT_PASSED_TWICE!>ok<!> = "world"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun same(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "ok") ok: kotlin.String!, /*1*/ @kotlin.annotations.jvm.internal.ParameterName(value = "ok") second: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
import kotlin.internal.*;
|
||||
|
||||
public class A {
|
||||
public void dollarName(@ParameterName("$") String host) {
|
||||
}
|
||||
|
||||
public void numberName(@ParameterName("42") String field) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val test = A()
|
||||
test.<!INAPPLICABLE_CANDIDATE!>dollarName<!>(`$` = "hello")
|
||||
test.dollarName("hello")
|
||||
test.dollarName(host = "hello")
|
||||
|
||||
test.<!INAPPLICABLE_CANDIDATE!>numberName<!>(`42` = "world")
|
||||
test.numberName("world")
|
||||
test.numberName(field = "world")
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
import kotlin.internal.*;
|
||||
|
||||
public class A {
|
||||
public void dollarName(@ParameterName("$") String host) {
|
||||
}
|
||||
|
||||
public void numberName(@ParameterName("42") String field) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun main() {
|
||||
val test = A()
|
||||
test.dollarName(`$` = "hello")
|
||||
test.dollarName("hello")
|
||||
test.dollarName(<!NAMED_PARAMETER_NOT_FOUND!>host<!> = "hello"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
|
||||
test.numberName(`42` = "world")
|
||||
test.numberName("world")
|
||||
test.numberName(<!NAMED_PARAMETER_NOT_FOUND!>field<!> = "world"<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open fun dollarName(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "$") `$`: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun numberName(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "42") 42: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
// FIR_IDENTICAL
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
|
||||
public class A {
|
||||
public void foo(@ParameterName("hello") String world) {}
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
|
||||
class B : A() {
|
||||
override fun foo(hello: String) {}
|
||||
}
|
||||
|
||||
// FILE: C.kt
|
||||
|
||||
class C : A() {
|
||||
}
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun foo(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "hello") hello: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class B : A {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ fun foo(/*0*/ hello: kotlin.String): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class C : A {
|
||||
public constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun foo(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "hello") hello: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
|
||||
// ANDROID_ANNOTATIONS
|
||||
// FILE: A.java
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
class A {
|
||||
public static String withDefault(@DefaultValue("OK") String arg) {
|
||||
return arg;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
return A.withDefault();
|
||||
}
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
package
|
||||
|
||||
public fun box(): kotlin.String
|
||||
|
||||
public/*package*/ open class A {
|
||||
public/*package*/ constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public open fun withDefault(/*0*/ @kotlin.annotations.jvm.internal.DefaultValue(value = "OK") arg: kotlin.String! = ...): kotlin.String!
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
public open class StableName : R|kotlin/Any| {
|
||||
public open fun connect(@R|kotlin/annotations/jvm/internal/ParameterName|(String(host)) host: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|test/StableName|
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// SKIP_IN_RUNTIME_TEST
|
||||
// ANDROID_ANNOTATIONS
|
||||
|
||||
package test;
|
||||
|
||||
import kotlin.annotations.jvm.internal.*;
|
||||
|
||||
public class StableName {
|
||||
public void connect(@ParameterName("host") String host) {
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package test
|
||||
|
||||
public open class StableName {
|
||||
public constructor StableName()
|
||||
public open fun connect(/*0*/ @kotlin.annotations.jvm.internal.ParameterName(value = "host") /* annotation class not found */ host: kotlin.String!): kotlin.Unit
|
||||
}
|
||||
Generated
-78
@@ -16434,42 +16434,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/signatureAnnotations"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultEnum.kt")
|
||||
public void testDefaultEnum() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultLongLiteral.kt")
|
||||
public void testDefaultLongLiteral() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultLongLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultNull.kt")
|
||||
public void testDefaultNull() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNull.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultNullAndParameter.kt")
|
||||
public void testDefaultNullAndParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNullAndParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultParameter.kt")
|
||||
public void testDefaultParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("emptyParameterName.kt")
|
||||
public void testEmptyParameterName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/emptyParameterName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("notNullVarargOverride.kt")
|
||||
public void testNotNullVarargOverride() throws Exception {
|
||||
@@ -16481,48 +16445,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
public void testNullableVarargOverride() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/nullableVarargOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overridesDefaultValue.kt")
|
||||
public void testOverridesDefaultValue() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesDefaultValue.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overridesParameterName.kt")
|
||||
public void testOverridesParameterName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesParameterName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reorderedParameterNames.kt")
|
||||
public void testReorderedParameterNames() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/reorderedParameterNames.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("sameParameterName.kt")
|
||||
public void testSameParameterName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/sameParameterName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("specialCharsParameterName.kt")
|
||||
public void testSpecialCharsParameterName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/specialCharsParameterName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("stableParameterName.kt")
|
||||
public void testStableParameterName() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/stableParameterName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("staticMethodWithDefaultValue.kt")
|
||||
public void testStaticMethodWithDefaultValue() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/staticMethodWithDefaultValue.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
-88
@@ -37307,94 +37307,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class SignatureAnnotations {
|
||||
@Test
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultAndNamedCombination.kt")
|
||||
public void testDefaultAndNamedCombination() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultAndNamedCombination.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultBoxTypes.kt")
|
||||
public void testDefaultBoxTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultBoxTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultEnumType.kt")
|
||||
public void testDefaultEnumType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultEnumType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultLongLiteral.kt")
|
||||
public void testDefaultLongLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultLongLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultMultipleParams.kt")
|
||||
public void testDefaultMultipleParams() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultMultipleParams.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultNull.kt")
|
||||
public void testDefaultNull() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNull.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultNullableBoxTypes.kt")
|
||||
public void testDefaultNullableBoxTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNullableBoxTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultOverrides.kt")
|
||||
public void testDefaultOverrides() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultPrimitiveTypes.kt")
|
||||
public void testDefaultPrimitiveTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultPrimitiveTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultValueInConstructor.kt")
|
||||
public void testDefaultValueInConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultValueInConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultWithJavaBase.kt")
|
||||
public void testDefaultWithJavaBase() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithJavaBase.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultWithKotlinBase.kt")
|
||||
public void testDefaultWithKotlinBase() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithKotlinBase.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reorderedParameterNames.kt")
|
||||
public void testReorderedParameterNames() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/smap")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
-88
@@ -37307,94 +37307,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class SignatureAnnotations {
|
||||
@Test
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultAndNamedCombination.kt")
|
||||
public void testDefaultAndNamedCombination() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultAndNamedCombination.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultBoxTypes.kt")
|
||||
public void testDefaultBoxTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultBoxTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultEnumType.kt")
|
||||
public void testDefaultEnumType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultEnumType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultLongLiteral.kt")
|
||||
public void testDefaultLongLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultLongLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultMultipleParams.kt")
|
||||
public void testDefaultMultipleParams() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultMultipleParams.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultNull.kt")
|
||||
public void testDefaultNull() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNull.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultNullableBoxTypes.kt")
|
||||
public void testDefaultNullableBoxTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNullableBoxTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultOverrides.kt")
|
||||
public void testDefaultOverrides() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultPrimitiveTypes.kt")
|
||||
public void testDefaultPrimitiveTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultPrimitiveTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultValueInConstructor.kt")
|
||||
public void testDefaultValueInConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultValueInConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultWithJavaBase.kt")
|
||||
public void testDefaultWithJavaBase() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithJavaBase.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultWithKotlinBase.kt")
|
||||
public void testDefaultWithKotlinBase() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithKotlinBase.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reorderedParameterNames.kt")
|
||||
public void testReorderedParameterNames() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/smap")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+3
-10
@@ -8,14 +8,12 @@ package org.jetbrains.kotlin.test.backend.classic
|
||||
import org.jetbrains.kotlin.cli.jvm.config.jvmClasspathRoots
|
||||
import org.jetbrains.kotlin.codegen.ClassFileFactory
|
||||
import org.jetbrains.kotlin.codegen.CodegenTestUtil
|
||||
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.JVMConfigurationKeys
|
||||
import org.jetbrains.kotlin.config.JvmTarget
|
||||
import org.jetbrains.kotlin.test.compileJavaFilesExternally
|
||||
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives
|
||||
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.USE_JAVAC_BASED_ON_JVM_TARGET
|
||||
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives
|
||||
import org.jetbrains.kotlin.test.model.TestModule
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
import org.jetbrains.kotlin.test.services.assertions
|
||||
@@ -26,16 +24,11 @@ import org.jetbrains.kotlin.test.util.KtTestUtil
|
||||
import java.io.File
|
||||
|
||||
class JavaCompilerFacade(private val testServices: TestServices) {
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun compileJavaFiles(module: TestModule, configuration: CompilerConfiguration, classFileFactory: ClassFileFactory) {
|
||||
if (module.javaFiles.isEmpty()) return
|
||||
val javaClasspath = buildList {
|
||||
add(testServices.compiledClassesManager.getCompiledKotlinDirForModule(module, classFileFactory).path)
|
||||
addAll(configuration.jvmClasspathRoots.map { it.absolutePath })
|
||||
if (JvmEnvironmentConfigurationDirectives.ANDROID_ANNOTATIONS in module.directives) {
|
||||
add(ForTestCompileRuntime.androidAnnotationsForTests().path)
|
||||
}
|
||||
}
|
||||
val javaClasspath =
|
||||
listOf(testServices.compiledClassesManager.getCompiledKotlinDirForModule(module, classFileFactory).path) +
|
||||
configuration.jvmClasspathRoots.map { it.absolutePath }
|
||||
|
||||
val javaClassesOutputDirectory = testServices.compiledClassesManager.getOrCreateCompiledJavaDirForModule(module)
|
||||
|
||||
|
||||
-2
@@ -30,8 +30,6 @@ object JvmEnvironmentConfigurationDirectives : SimpleDirectivesContainer() {
|
||||
val WITH_REFLECT by directive("Add Kotlin reflect to classpath")
|
||||
val NO_RUNTIME by directive("Don't add any runtime libs to classpath")
|
||||
|
||||
val ANDROID_ANNOTATIONS by directive("Add android annotations to classpath")
|
||||
|
||||
val USE_PSI_CLASS_FILES_READING by directive("Use a slower (PSI-based) class files reading implementation")
|
||||
val USE_JAVAC by directive("Enable javac integration")
|
||||
val SKIP_JAVA_SOURCES by directive("Don't add java sources to compile classpath")
|
||||
|
||||
-4
@@ -132,10 +132,6 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
|
||||
configuration.addJvmClasspathRoot(ForTestCompileRuntime.runtimeJarForTestsWithJdk8())
|
||||
}
|
||||
|
||||
if (JvmEnvironmentConfigurationDirectives.ANDROID_ANNOTATIONS in module.directives) {
|
||||
configuration.addJvmClasspathRoot(ForTestCompileRuntime.androidAnnotationsForTests())
|
||||
}
|
||||
|
||||
val isIr = module.targetBackend?.isIR == true
|
||||
configuration.put(JVMConfigurationKeys.IR, isIr)
|
||||
|
||||
|
||||
-4
@@ -4,7 +4,6 @@
|
||||
*/
|
||||
package org.jetbrains.kotlin.checkers
|
||||
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoot
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
@@ -91,9 +90,6 @@ abstract class KotlinMultiFileTestWithJava<M : KotlinBaseTest.TestModule, F : Ko
|
||||
}
|
||||
result.addAll(getExtraClasspath())
|
||||
val fileText = file.readText(Charsets.UTF_8)
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(fileText, "ANDROID_ANNOTATIONS")) {
|
||||
result.add(ForTestCompileRuntime.androidAnnotationsForTests())
|
||||
}
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(fileText, "STDLIB_JDK8")) {
|
||||
result.add(ForTestCompileRuntime.runtimeJarForTestsWithJdk8())
|
||||
}
|
||||
|
||||
@@ -413,20 +413,10 @@ public abstract class CodegenTestCase extends KotlinBaseTest<KotlinBaseTest.Test
|
||||
File javaSourceDir = writeJavaFiles(files);
|
||||
|
||||
configurationKind = extractConfigurationKind(files);
|
||||
boolean loadAndroidAnnotations = files.stream().anyMatch(
|
||||
it -> InTextDirectivesUtils.isDirectiveDefined(it.content, "ANDROID_ANNOTATIONS")
|
||||
);
|
||||
|
||||
List<File> classpath = new ArrayList<>();
|
||||
classpath.add(getAnnotationsJar());
|
||||
|
||||
if (loadAndroidAnnotations) {
|
||||
classpath.add(ForTestCompileRuntime.androidAnnotationsForTests());
|
||||
}
|
||||
|
||||
CompilerConfiguration configuration = createConfiguration(
|
||||
configurationKind, getTestJdkKind(files), getBackend(),
|
||||
classpath,
|
||||
Collections.singletonList(getAnnotationsJar()),
|
||||
ArraysKt.filterNotNull(new File[] {javaSourceDir}),
|
||||
files
|
||||
);
|
||||
@@ -453,9 +443,6 @@ public abstract class CodegenTestCase extends KotlinBaseTest<KotlinBaseTest.Test
|
||||
List<String> javaClasspath = new ArrayList<>();
|
||||
javaClasspath.add(kotlinOut.getPath());
|
||||
|
||||
if (loadAndroidAnnotations) {
|
||||
javaClasspath.add(ForTestCompileRuntime.androidAnnotationsForTests().getPath());
|
||||
}
|
||||
updateJavaClasspath(javaClasspath);
|
||||
|
||||
javaClassesOutputDirectory = getJavaClassesOutputDirectory();
|
||||
|
||||
-4
@@ -183,10 +183,6 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir {
|
||||
|
||||
CommonConfigurationKeysKt.setLanguageVersionSettings(configuration, languageVersionSettings);
|
||||
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(content, "ANDROID_ANNOTATIONS")) {
|
||||
JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.androidAnnotationsForTests());
|
||||
}
|
||||
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(content, "JVM_ANNOTATIONS")) {
|
||||
JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.jvmAnnotationsForTests());
|
||||
}
|
||||
|
||||
@@ -173,10 +173,6 @@ public class LoadDescriptorUtil {
|
||||
|
||||
args.addAll(InTextDirectivesUtils.findListWithPrefixes(content, "JAVAC_OPTIONS:"));
|
||||
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(content, "ANDROID_ANNOTATIONS")) {
|
||||
classpath.add(ForTestCompileRuntime.androidAnnotationsForTests());
|
||||
}
|
||||
|
||||
if (InTextDirectivesUtils.isDirectiveDefined(content, "JVM_ANNOTATIONS")) {
|
||||
classpath.add(ForTestCompileRuntime.jvmAnnotationsForTests());
|
||||
}
|
||||
|
||||
-78
@@ -29796,84 +29796,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("defaultAndNamedCombination.kt")
|
||||
public void testDefaultAndNamedCombination() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultAndNamedCombination.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultBoxTypes.kt")
|
||||
public void testDefaultBoxTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultBoxTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultEnumType.kt")
|
||||
public void testDefaultEnumType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultEnumType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultLongLiteral.kt")
|
||||
public void testDefaultLongLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultLongLiteral.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultMultipleParams.kt")
|
||||
public void testDefaultMultipleParams() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultMultipleParams.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultNull.kt")
|
||||
public void testDefaultNull() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultNullableBoxTypes.kt")
|
||||
public void testDefaultNullableBoxTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNullableBoxTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultOverrides.kt")
|
||||
public void testDefaultOverrides() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultOverrides.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultPrimitiveTypes.kt")
|
||||
public void testDefaultPrimitiveTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultPrimitiveTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultValueInConstructor.kt")
|
||||
public void testDefaultValueInConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultValueInConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultWithJavaBase.kt")
|
||||
public void testDefaultWithJavaBase() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithJavaBase.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultWithKotlinBase.kt")
|
||||
public void testDefaultWithKotlinBase() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithKotlinBase.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reorderedParameterNames.kt")
|
||||
public void testReorderedParameterNames() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/smap")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
-18
@@ -1486,24 +1486,6 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractLoadJavaTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("StableName.java")
|
||||
public void testStableName() throws Exception {
|
||||
runTest("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
-18
@@ -1484,24 +1484,6 @@ public class LoadJavaWithPsiClassReadingTestGenerated extends AbstractLoadJavaWi
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractLoadJavaWithPsiClassReadingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("StableName.java")
|
||||
public void testStableName() throws Exception {
|
||||
runTest("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
-18
@@ -1487,24 +1487,6 @@ public class IrLoadJavaTestGenerated extends AbstractIrLoadJavaTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractIrLoadJavaTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("StableName.java")
|
||||
public void testStableName() throws Exception {
|
||||
runTest("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
-18
@@ -1486,24 +1486,6 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractLoadJavaUsingJavacTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("StableName.java")
|
||||
public void testStableName() throws Exception {
|
||||
runTest("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
-18
@@ -3766,24 +3766,6 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractJvmRuntimeDescriptorLoaderTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("StableName.java")
|
||||
public void testStableName() throws Exception {
|
||||
runTest("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
-13
@@ -25427,19 +25427,6 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractIrJsCodegenBoxES6Test {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/smap")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
-13
@@ -24912,19 +24912,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractIrJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/smap")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
-13
@@ -24872,19 +24872,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/smap")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
-13
@@ -13499,19 +13499,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/signatureAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SignatureAnnotations extends AbstractIrCodegenBoxWasmTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatureAnnotations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/smap")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user