Kapt: Fix "no interface expected here" in class implementing interface with secondary constructor (KT-27506)
This commit is contained in:
+2
-2
@@ -176,7 +176,7 @@ package test;
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public final class TFooBar extends Foo implements Bar, test.Intf {
|
||||
public final class TFooBar extends Foo implements test.Intf, Bar {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final X a = null;
|
||||
|
||||
@@ -310,7 +310,7 @@ package test;
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public final class TxFooxBarxBaz extends x.Foo implements x.Bar, x.Baz, test.Intf {
|
||||
public final class TxFooxBarxBaz extends x.Foo implements test.Intf, x.Bar, x.Baz {
|
||||
|
||||
public TxFooxBarxBaz() {
|
||||
super();
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// CORRECT_ERROR_TYPES
|
||||
|
||||
package secondary
|
||||
|
||||
interface Named {
|
||||
val name: String?
|
||||
}
|
||||
|
||||
class Product2 : Named {
|
||||
override var name: String? = null
|
||||
|
||||
constructor(otherName: String) {
|
||||
this.name = otherName
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package secondary;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public abstract interface Named {
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
public abstract java.lang.String getName();
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package secondary;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public final class Product2 implements secondary.Named {
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
private java.lang.String name;
|
||||
|
||||
@org.jetbrains.annotations.Nullable()
|
||||
@java.lang.Override()
|
||||
public java.lang.String getName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setName(@org.jetbrains.annotations.Nullable()
|
||||
java.lang.String p0) {
|
||||
}
|
||||
|
||||
public Product2(@org.jetbrains.annotations.NotNull()
|
||||
java.lang.String otherName) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user