Reorganized SAM-related test data.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package test;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
public class AmbiguousAdapters {
|
||||
public void foo(Runnable r) {
|
||||
}
|
||||
|
||||
public void foo(Closeable c) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
public open class AmbiguousAdapters : java.lang.Object {
|
||||
public constructor AmbiguousAdapters()
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.io.Closeable?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.lang.Runnable?): jet.Unit
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test;
|
||||
|
||||
public class Basic {
|
||||
public void foo(Runnable r) {
|
||||
}
|
||||
|
||||
public static void bar(Runnable r) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
public open class Basic : java.lang.Object {
|
||||
public constructor Basic()
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.lang.Runnable?): jet.Unit
|
||||
}
|
||||
|
||||
package Basic {
|
||||
public open /*synthesized*/ fun bar(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public open fun bar(/*0*/ p0: java.lang.Runnable?): jet.Unit
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package test;
|
||||
|
||||
public class Constructor {
|
||||
public Constructor(Runnable r) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public open class Constructor : java.lang.Object {
|
||||
public /*synthesized*/ constructor Constructor(/*0*/ p0: (() -> jet.Unit)?)
|
||||
public constructor Constructor(/*0*/ p0: java.lang.Runnable?)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package test;
|
||||
|
||||
public interface DeepSamLoop {
|
||||
|
||||
interface Foo {
|
||||
void foo(Bar p);
|
||||
}
|
||||
|
||||
interface Bar {
|
||||
void foo(Foo p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package test
|
||||
|
||||
public trait DeepSamLoop : java.lang.Object {
|
||||
|
||||
public trait Bar : java.lang.Object {
|
||||
public abstract /*synthesized*/ fun foo(/*0*/ p0: ((test.DeepSamLoop.Bar?) -> jet.Unit)?): jet.Unit
|
||||
public abstract fun foo(/*0*/ p0: test.DeepSamLoop.Foo?): jet.Unit
|
||||
}
|
||||
|
||||
public trait Foo : java.lang.Object {
|
||||
public abstract /*synthesized*/ fun foo(/*0*/ p0: ((test.DeepSamLoop.Foo?) -> jet.Unit)?): jet.Unit
|
||||
public abstract fun foo(/*0*/ p0: test.DeepSamLoop.Bar?): jet.Unit
|
||||
}
|
||||
}
|
||||
|
||||
package DeepSamLoop {
|
||||
public /*synthesized*/ fun Bar(/*0*/ function: (test.DeepSamLoop.Foo?) -> jet.Unit): test.DeepSamLoop.Bar
|
||||
public /*synthesized*/ fun Foo(/*0*/ function: (test.DeepSamLoop.Bar?) -> jet.Unit): test.DeepSamLoop.Foo
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
public interface InheritedOverridden {
|
||||
public class Super {
|
||||
public void foo(Runnable r) {
|
||||
}
|
||||
}
|
||||
|
||||
public class Sub extends Super {
|
||||
public void foo(Runnable r) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package test
|
||||
|
||||
public trait InheritedOverridden : java.lang.Object {
|
||||
|
||||
public open class Sub : test.InheritedOverridden.Super {
|
||||
public constructor Sub()
|
||||
public open override /*1*/ /*synthesized*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public open override /*1*/ fun foo(/*0*/ p0: java.lang.Runnable?): jet.Unit
|
||||
}
|
||||
|
||||
public open class Super : java.lang.Object {
|
||||
public constructor Super()
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.lang.Runnable?): jet.Unit
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
public interface InheritedOverriddenAdapter {
|
||||
public class Super {
|
||||
public void foo(Runnable r) {
|
||||
}
|
||||
}
|
||||
|
||||
public class Sub extends Super {
|
||||
public void foo(jet.Function0<jet.Unit> r) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package test
|
||||
|
||||
public trait InheritedOverriddenAdapter : java.lang.Object {
|
||||
|
||||
public open class Sub : test.InheritedOverriddenAdapter.Super {
|
||||
public constructor Sub()
|
||||
public open override /*1*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable?): jet.Unit
|
||||
}
|
||||
|
||||
public open class Super : java.lang.Object {
|
||||
public constructor Super()
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.lang.Runnable?): jet.Unit
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
public interface InheritedSimple {
|
||||
public interface Super {
|
||||
void foo(Runnable r);
|
||||
}
|
||||
|
||||
public interface Sub extends Super {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package test
|
||||
|
||||
public trait InheritedSimple : java.lang.Object {
|
||||
|
||||
public trait Sub : test.InheritedSimple.Super {
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable?): jet.Unit
|
||||
}
|
||||
|
||||
public trait Super : java.lang.Object {
|
||||
public abstract /*synthesized*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public abstract fun foo(/*0*/ p0: java.lang.Runnable?): jet.Unit
|
||||
}
|
||||
}
|
||||
|
||||
package InheritedSimple {
|
||||
public /*synthesized*/ fun Sub(/*0*/ function: (java.lang.Runnable?) -> jet.Unit): test.InheritedSimple.Sub
|
||||
public /*synthesized*/ fun Super(/*0*/ function: (java.lang.Runnable?) -> jet.Unit): test.InheritedSimple.Super
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package test;
|
||||
|
||||
import java.io.FilenameFilter;
|
||||
import java.util.Comparator;
|
||||
|
||||
public class NonTrivialFunctionType {
|
||||
public void foo(FilenameFilter filenameFilter) {
|
||||
}
|
||||
|
||||
public void foo(Comparator<String> comparator) {
|
||||
}
|
||||
|
||||
public void wildcardUnbound(Comparator<?> comparator) {
|
||||
}
|
||||
|
||||
public void wildcardBound(Comparator<? super CharSequence> comparator) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
public open class NonTrivialFunctionType : java.lang.Object {
|
||||
public constructor NonTrivialFunctionType()
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: ((java.io.File, jet.String) -> jet.Boolean)?): jet.Unit
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: ((jet.String, jet.String) -> jet.Int)?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.io.FilenameFilter?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.util.Comparator<jet.String>?): jet.Unit
|
||||
public open /*synthesized*/ fun wildcardBound(/*0*/ p0: ((jet.CharSequence?, jet.CharSequence?) -> jet.Int)?): jet.Unit
|
||||
public open fun wildcardBound(/*0*/ p0: java.util.Comparator<in jet.CharSequence?>?): jet.Unit
|
||||
public open fun wildcardUnbound(/*0*/ p0: java.util.Comparator<out jet.Any?>?): jet.Unit
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test;
|
||||
|
||||
public interface SelfAsParameter {
|
||||
void foo(SelfAsParameter p);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
public /*synthesized*/ fun SelfAsParameter(/*0*/ function: (test.SelfAsParameter?) -> jet.Unit): test.SelfAsParameter
|
||||
|
||||
public trait SelfAsParameter : java.lang.Object {
|
||||
public abstract /*synthesized*/ fun foo(/*0*/ p0: ((test.SelfAsParameter?) -> jet.Unit)?): jet.Unit
|
||||
public abstract fun foo(/*0*/ p0: test.SelfAsParameter?): jet.Unit
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class SeveralSamParameters {
|
||||
public static String findMaxAndInvokeCallback(Comparator<String> comparator, String a, String b, Runnable afterRunnable) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
public open class SeveralSamParameters : java.lang.Object {
|
||||
public constructor SeveralSamParameters()
|
||||
}
|
||||
|
||||
package SeveralSamParameters {
|
||||
public open /*synthesized*/ fun findMaxAndInvokeCallback(/*0*/ p0: ((jet.String, jet.String) -> jet.Int)?, /*1*/ p1: jet.String?, /*2*/ p2: jet.String?, /*3*/ p3: (() -> jet.Unit)?): jet.String?
|
||||
public open fun findMaxAndInvokeCallback(/*0*/ p0: java.util.Comparator<jet.String>?, /*1*/ p1: jet.String?, /*2*/ p2: jet.String?, /*3*/ p3: java.lang.Runnable?): jet.String?
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class TypeParameterOfClass<T> {
|
||||
public void foo(Comparator<T> comparator) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
public open class TypeParameterOfClass</*0*/ T> : java.lang.Object {
|
||||
public constructor TypeParameterOfClass</*0*/ T>()
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: ((T, T) -> jet.Int)?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.util.Comparator<T>?): jet.Unit
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package test;
|
||||
|
||||
import java.lang.UnsupportedOperationException;
|
||||
import java.util.*;
|
||||
import java.util.Comparator;
|
||||
|
||||
public class TypeParameterOfMethod {
|
||||
public static <T> T max(Comparator<T> comparator, T value1, T value2) {
|
||||
return comparator.compare(value1, value2) > 0 ? value1 : value2;
|
||||
}
|
||||
|
||||
public static <T extends CharSequence> T max2(Comparator<T> comparator, T value1, T value2) {
|
||||
return comparator.compare(value1, value2) > 0 ? value1 : value2;
|
||||
}
|
||||
|
||||
public static <A extends CharSequence, B extends List<A>> void method(Comparator<A> a, B b) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package test
|
||||
|
||||
public open class TypeParameterOfMethod : java.lang.Object {
|
||||
public constructor TypeParameterOfMethod()
|
||||
}
|
||||
|
||||
package TypeParameterOfMethod {
|
||||
public open /*synthesized*/ fun </*0*/ T> max(/*0*/ p0: ((T, T) -> jet.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T?
|
||||
public open fun </*0*/ T> max(/*0*/ p0: java.util.Comparator<T>?, /*1*/ p1: T?, /*2*/ p2: T?): T?
|
||||
public open /*synthesized*/ fun </*0*/ T : jet.CharSequence?> max2(/*0*/ p0: ((T, T) -> jet.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T?
|
||||
public open fun </*0*/ T : jet.CharSequence?> max2(/*0*/ p0: java.util.Comparator<T>?, /*1*/ p1: T?, /*2*/ p2: T?): T?
|
||||
public open /*synthesized*/ fun </*0*/ A : jet.CharSequence?, /*1*/ B : jet.List<A>?> method(/*0*/ p0: ((A, A) -> jet.Int)?, /*1*/ p1: B?): jet.Unit
|
||||
public open fun </*0*/ A : jet.CharSequence?, /*1*/ B : jet.List<A>?> method(/*0*/ p0: java.util.Comparator<A>?, /*1*/ p1: B?): jet.Unit
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class TypeParameterOfOuterClass<T> {
|
||||
public class Inner {
|
||||
public void foo(Comparator<T> comparator) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
public open class TypeParameterOfOuterClass</*0*/ T> : java.lang.Object {
|
||||
public constructor TypeParameterOfOuterClass</*0*/ T>()
|
||||
|
||||
public open inner class Inner : java.lang.Object {
|
||||
public constructor Inner()
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: ((T, T) -> jet.Int)?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.util.Comparator<T>?): jet.Unit
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user