Add test for obsolete issue about SAMs
#KT-11951 Obsolete
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// FILE: BehaviorSubject.java
|
||||||
|
public class BehaviorSubject<T> extends Observable<T> {
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Observable.java
|
||||||
|
|
||||||
|
public class Observable<T> {
|
||||||
|
public static <T> Observable<T> create(Observable.OnSubscribe<T> f) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public interface OnSubscribe<T> {
|
||||||
|
void call(T t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 1.kt
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
BehaviorSubject.create<String>(null)
|
||||||
|
BehaviorSubject.create<Int> { }
|
||||||
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
|
||||||
|
|
||||||
|
public open class BehaviorSubject</*0*/ T : kotlin.Any!> : Observable<T!> {
|
||||||
|
public constructor BehaviorSubject</*0*/ T : kotlin.Any!>()
|
||||||
|
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 override /*1*/ /*fake_override*/ fun </*0*/ T : kotlin.Any!> create(/*0*/ f: Observable.OnSubscribe<T!>!): Observable<T!>!
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class Observable</*0*/ T : kotlin.Any!> {
|
||||||
|
public constructor Observable</*0*/ T : kotlin.Any!>()
|
||||||
|
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 interface OnSubscribe</*0*/ T : kotlin.Any!> {
|
||||||
|
public abstract fun call(/*0*/ t: T!): 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
|
||||||
|
}
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
public open fun </*0*/ T : kotlin.Any!> create(/*0*/ f: Observable.OnSubscribe<T!>!): Observable<T!>!
|
||||||
|
}
|
||||||
@@ -12621,6 +12621,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("fakeOverrideFunctionForStaticSam.kt")
|
||||||
|
public void testFakeOverrideFunctionForStaticSam() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/fakeOverrideFunctionForStaticSam.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inheritedStaticSam.kt")
|
@TestMetadata("inheritedStaticSam.kt")
|
||||||
public void testInheritedStaticSam() throws Exception {
|
public void testInheritedStaticSam() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/inheritedStaticSam.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/inheritedStaticSam.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user