properly read vararg signature from java code
KT-1694 Java vararg override, Why is it intuitive interface? #KT-1694 Fixed
This commit is contained in:
+1
@@ -1087,6 +1087,7 @@ public class JavaDescriptorResolver {
|
|||||||
JetType varargElementType;
|
JetType varargElementType;
|
||||||
if (psiType instanceof PsiEllipsisType) {
|
if (psiType instanceof PsiEllipsisType) {
|
||||||
varargElementType = JetStandardLibrary.getInstance().getArrayElementType(TypeUtils.makeNotNullable(outType));
|
varargElementType = JetStandardLibrary.getInstance().getArrayElementType(TypeUtils.makeNotNullable(outType));
|
||||||
|
outType = TypeUtils.makeNotNullable(outType);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
varargElementType = null;
|
varargElementType = null;
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
// FILE: Aaa.java
|
||||||
|
// http://youtrack.jetbrains.com/issue/KT-1694
|
||||||
|
|
||||||
|
public abstract class Aaa {
|
||||||
|
public abstract void foo(String... args);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: bbb.kt
|
||||||
|
|
||||||
|
class Bbb() : Aaa() {
|
||||||
|
override fun foo(vararg args: String?) = #()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user