xxx$default() function should be visible from Java
This commit is contained in:
@@ -508,7 +508,7 @@ public class FunctionCodegen extends ParentCodegenAwareImpl {
|
|||||||
|
|
||||||
Method jvmSignature = signature.getAsmMethod();
|
Method jvmSignature = signature.getAsmMethod();
|
||||||
|
|
||||||
int flags = ACC_PUBLIC | ACC_SYNTHETIC; // TODO.
|
int flags = getVisibilityAccessFlag(functionDescriptor) | getDeprecatedAccessFlag(functionDescriptor);
|
||||||
|
|
||||||
Type ownerType;
|
Type ownerType;
|
||||||
if (contextClass instanceof PackageFragmentDescriptor) {
|
if (contextClass instanceof PackageFragmentDescriptor) {
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
class JavaClass {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
_DefaultPackage.foo$default(1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
fun foo(a: Int = 1) {}
|
||||||
+5
@@ -112,6 +112,11 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
|
|||||||
doTest("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntegerArray.kt");
|
doTest("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntegerArray.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("DefaultMethod.kt")
|
||||||
|
public void testDefaultMethod() throws Exception {
|
||||||
|
doTest("compiler/testData/compileJavaAgainstKotlin/method/DefaultMethod.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("Delegation.kt")
|
@TestMetadata("Delegation.kt")
|
||||||
public void testDelegation() throws Exception {
|
public void testDelegation() throws Exception {
|
||||||
doTest("compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt");
|
doTest("compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user