patch from audalov for KT-1959
This commit is contained in:
Generated
+1
-5
@@ -19,11 +19,7 @@
|
|||||||
<entry name="?*.kt" />
|
<entry name="?*.kt" />
|
||||||
<entry name="?*.template" />
|
<entry name="?*.template" />
|
||||||
</wildcardResourcePatterns>
|
</wildcardResourcePatterns>
|
||||||
<annotationProcessing>
|
<annotationProcessing enabled="false" useClasspath="true" />
|
||||||
<profile default="true" name="Default" enabled="false">
|
|
||||||
<processorPath useClasspath="true" />
|
|
||||||
</profile>
|
|
||||||
</annotationProcessing>
|
|
||||||
</component>
|
</component>
|
||||||
<component name="JavacSettings">
|
<component name="JavacSettings">
|
||||||
<option name="ADDITIONAL_OPTIONS_STRING" value="-target 1.6" />
|
<option name="ADDITIONAL_OPTIONS_STRING" value="-target 1.6" />
|
||||||
|
|||||||
@@ -543,6 +543,9 @@ public class FunctionCodegen {
|
|||||||
if (argType.getSort() == Type.OBJECT) {
|
if (argType.getSort() == Type.OBJECT) {
|
||||||
StackValue.onStack(JetTypeMapper.TYPE_OBJECT).put(method.getArgumentTypes()[i], iv);
|
StackValue.onStack(JetTypeMapper.TYPE_OBJECT).put(method.getArgumentTypes()[i], iv);
|
||||||
}
|
}
|
||||||
|
else if (argType.getSort() == Type.ARRAY) {
|
||||||
|
StackValue.onStack(JetTypeMapper.ARRAY_GENERIC_TYPE).put(method.getArgumentTypes()[i], iv);
|
||||||
|
}
|
||||||
|
|
||||||
//noinspection AssignmentToForLoopParameter
|
//noinspection AssignmentToForLoopParameter
|
||||||
reg += argType.getSize();
|
reg += argType.getSize();
|
||||||
@@ -584,6 +587,9 @@ public class FunctionCodegen {
|
|||||||
if (argType.getSort() == Type.OBJECT) {
|
if (argType.getSort() == Type.OBJECT) {
|
||||||
StackValue.onStack(JetTypeMapper.TYPE_OBJECT).put(method.getArgumentTypes()[i], iv);
|
StackValue.onStack(JetTypeMapper.TYPE_OBJECT).put(method.getArgumentTypes()[i], iv);
|
||||||
}
|
}
|
||||||
|
else if (argType.getSort() == Type.ARRAY) {
|
||||||
|
StackValue.onStack(JetTypeMapper.ARRAY_GENERIC_TYPE).put(method.getArgumentTypes()[i], iv);
|
||||||
|
}
|
||||||
|
|
||||||
//noinspection AssignmentToForLoopParameter
|
//noinspection AssignmentToForLoopParameter
|
||||||
reg += argType.getSize();
|
reg += argType.getSize();
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
open class A<T> {
|
||||||
|
open fun f(args : Array<T>) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
class B(): A<String>() {
|
||||||
|
override fun f(args : Array<String>) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
B()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String = "OK"
|
||||||
@@ -23,4 +23,9 @@ public class BridgeMethodGenTest extends CodegenTestCase {
|
|||||||
createEnvironmentWithMockJdkAndIdeaAnnotations(CompilerSpecialMode.JDK_HEADERS);
|
createEnvironmentWithMockJdkAndIdeaAnnotations(CompilerSpecialMode.JDK_HEADERS);
|
||||||
blackBoxFile("bridge.jet");
|
blackBoxFile("bridge.jet");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testKt1959() {
|
||||||
|
createEnvironmentWithMockJdkAndIdeaAnnotations(CompilerSpecialMode.JDK_HEADERS);
|
||||||
|
blackBoxFile("regressions/kt1959.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user