Fix for KT-6106: Using platformStatic crashes intellisense (but not Compiler)

#KT-6106 Fixed
This commit is contained in:
Nikolay Krasko
2014-10-23 19:17:05 +04:00
committed by Michael Bogdanov
parent c50ca3ab86
commit ea69f5a9a6
6 changed files with 106 additions and 14 deletions
@@ -485,7 +485,7 @@ public class FunctionCodegen extends ParentCodegenAware {
}
@NotNull
private static String[] getThrownExceptions(@NotNull FunctionDescriptor function, @NotNull final JetTypeMapper mapper) {
public static String[] getThrownExceptions(@NotNull FunctionDescriptor function, @NotNull final JetTypeMapper mapper) {
AnnotationDescriptor annotation = function.getAnnotations().findAnnotation(new FqName("kotlin.throws"));
if (annotation == null) return ArrayUtil.EMPTY_STRING_ARRAY;
@@ -39,7 +39,8 @@ class PlatformStaticGenerator(
Opcodes.ACC_STATIC or AsmUtil.getMethodAsmFlags(descriptor, OwnerKind.IMPLEMENTATION),
asmMethod.getName()!!,
asmMethod.getDescriptor()!!,
null, null)
typeMapper.mapSignature(descriptor).getGenericsSignature(),
FunctionCodegen.getThrownExceptions(descriptor, typeMapper))
AnnotationCodegen.forMethod(methodVisitor, typeMapper)!!.genAnnotations(descriptor, asmMethod.getReturnType())