Supported methods with default arguments in partial package compilation.

This commit is contained in:
Evgeny Gerashchenko
2014-08-28 17:06:43 +04:00
parent 3226093fa6
commit 35720ff46d
6 changed files with 26 additions and 0 deletions
@@ -187,6 +187,11 @@ public class PackageCodegen {
}
}
);
memberCodegen.functionCodegen.generateDefaultIfNeeded(
context.intoFunction(function), signature, function, OwnerKind.PACKAGE,
DefaultParameterValueLoader.DEFAULT, null);
}
else if (member instanceof DeserializedPropertyDescriptor) {
memberCodegen.propertyCodegen.generateInPackageFacade((DeserializedPropertyDescriptor) member);
@@ -110,6 +110,11 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
doTest("jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/");
}
@TestMetadata("defaultArguments")
public void testDefaultArguments() throws Exception {
doTest("jps-plugin/testData/incremental/pureKotlin/defaultArguments/");
}
@TestMetadata("dependencyClassReferenced")
public void testDependencyClassReferenced() throws Exception {
doTest("jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/");
@@ -0,0 +1,3 @@
fun a(p1: String, p2: String? = null) {
}
@@ -0,0 +1,3 @@
fun a(p1: String, p2: String? = null) {
}
@@ -0,0 +1,3 @@
fun b(p1: String, p2: String? = null) {
}
@@ -0,0 +1,7 @@
Cleaning output files:
out/production/module/_DefaultPackage-a-*.class
out/production/module/_DefaultPackage.class
End of files
Compiling files:
src/a.kt
End of files