KT-5425 Kotlin plugin crashes when project uses RxJava 17.0 or older
#KT-5425 Fixed
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
// FILE: j/OnSubscribe.java
|
||||||
|
package j;
|
||||||
|
|
||||||
|
public interface OnSubscribe<T> {
|
||||||
|
void f();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: j/Observable.java
|
||||||
|
package j;
|
||||||
|
|
||||||
|
public class Observable<T> {
|
||||||
|
|
||||||
|
protected Observable(OnSubscribe<T> f) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Kotlin.kt
|
||||||
|
|
||||||
|
import j.*
|
||||||
|
|
||||||
|
class K : Observable<String>({})
|
||||||
@@ -5151,6 +5151,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
|||||||
doTest("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound.kt");
|
doTest("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("samInConstructorWithGenerics.kt")
|
||||||
|
public void testSamInConstructorWithGenerics() throws Exception {
|
||||||
|
doTest("compiler/testData/diagnostics/tests/j+k/samInConstructorWithGenerics.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("Simple.kt")
|
@TestMetadata("Simple.kt")
|
||||||
public void testSimple() throws Exception {
|
public void testSimple() throws Exception {
|
||||||
doTest("compiler/testData/diagnostics/tests/j+k/Simple.kt");
|
doTest("compiler/testData/diagnostics/tests/j+k/Simple.kt");
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ public class JavaConstructorDescriptor extends ConstructorDescriptorImpl impleme
|
|||||||
@Nullable FunctionDescriptor original,
|
@Nullable FunctionDescriptor original,
|
||||||
@NotNull Kind kind
|
@NotNull Kind kind
|
||||||
) {
|
) {
|
||||||
if (kind != Kind.DECLARATION) {
|
if (kind != Kind.DECLARATION && kind != Kind.SYNTHESIZED) {
|
||||||
throw new IllegalStateException("Attempt at creating a constructor that is not a declaration: \n" +
|
throw new IllegalStateException("Attempt at creating a constructor that is not a declaration: \n" +
|
||||||
"copy from: " + this + "\n" +
|
"copy from: " + this + "\n" +
|
||||||
"newOwner: " + newOwner + "\n" +
|
"newOwner: " + newOwner + "\n" +
|
||||||
|
|||||||
+1
-1
@@ -112,7 +112,7 @@ public class ConstructorDescriptorImpl extends FunctionDescriptorImpl implements
|
|||||||
@Nullable FunctionDescriptor original,
|
@Nullable FunctionDescriptor original,
|
||||||
@NotNull Kind kind
|
@NotNull Kind kind
|
||||||
) {
|
) {
|
||||||
if (kind != Kind.DECLARATION) {
|
if (kind != Kind.DECLARATION && kind != Kind.SYNTHESIZED) {
|
||||||
throw new IllegalStateException("Attempt at creating a constructor that is not a declaration: \n" +
|
throw new IllegalStateException("Attempt at creating a constructor that is not a declaration: \n" +
|
||||||
"copy from: " + this + "\n" +
|
"copy from: " + this + "\n" +
|
||||||
"newOwner: " + newOwner + "\n" +
|
"newOwner: " + newOwner + "\n" +
|
||||||
|
|||||||
Reference in New Issue
Block a user