[SAM with receiver] Prepare module structure to K2 implementation
This commit is contained in:
committed by
teamcity
parent
e54c6eeafc
commit
ffc680f4a6
@@ -0,0 +1,33 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE,-UNUSED_ANONYMOUS_PARAMETER
|
||||
|
||||
// FILE: SamWithReceiver1.java
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface SamWithReceiver1 {
|
||||
}
|
||||
|
||||
// FILE: Sam.java
|
||||
@SamWithReceiver1
|
||||
public interface Sam {
|
||||
void run(String a, String b);
|
||||
}
|
||||
|
||||
// FILE: Exec.java
|
||||
public class Exec {
|
||||
void exec(Sam sam) { sam.run("a", "b") }
|
||||
}
|
||||
|
||||
// FILE: test_with_error.kts
|
||||
val e = Exec()
|
||||
|
||||
e.exec <!TYPE_MISMATCH!>{ <!EXPECTED_PARAMETERS_NUMBER_MISMATCH!>a, <!CANNOT_INFER_PARAMETER_TYPE!>b<!><!> -> System.out.println(a) }<!>
|
||||
|
||||
// FILE: test.kts
|
||||
val e = Exec()
|
||||
|
||||
e.exec { b ->
|
||||
val a: String = this
|
||||
System.out.println(a)
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package
|
||||
|
||||
public open class Exec {
|
||||
public constructor Exec()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public/*package*/ open fun exec(/*0*/ sam: Sam!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@SamWithReceiver1 public interface Sam {
|
||||
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 abstract fun run(/*0*/ a: kotlin.String!, /*1*/ b: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.annotation.Retention(value = AnnotationRetention.RUNTIME) public final annotation class SamWithReceiver1 : kotlin.Annotation {
|
||||
public constructor SamWithReceiver1()
|
||||
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 final class Test : kotlin.script.templates.standard.ScriptTemplateWithArgs {
|
||||
public constructor Test(/*0*/ args: kotlin.Array<kotlin.String>)
|
||||
public final override /*1*/ /*fake_override*/ val args: kotlin.Array<kotlin.String>
|
||||
public final val e: Exec
|
||||
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 final class Test_with_error : kotlin.script.templates.standard.ScriptTemplateWithArgs {
|
||||
public constructor Test_with_error(/*0*/ args: kotlin.Array<kotlin.String>)
|
||||
public final override /*1*/ /*fake_override*/ val args: kotlin.Array<kotlin.String>
|
||||
public final val e: Exec
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user