Refactor method/constructor calls in codegen

- use ResolvedCall where possible
- 'call' parameter to invokeMethodWithArguments was used only to generate
  callee, e.g. in "A()" where A is an expression which can be invoke()'d.
  In case of constructors and enum entry delegation specifiers there's no need
  to generate callee, so 'call' is made Nullable with a subsequent assert
- remove generateJavaConstructorCall() method, since it did no useful work.
  Java constructor invocation is broken anyway and needs to be fixed (KT-3532)
- minor code style / formatting issues fixed, several methods renamed to better
  reflect semantics
This commit is contained in:
Alexander Udalov
2013-04-21 22:00:32 +04:00
parent db65237989
commit 1eeaaad05d
6 changed files with 85 additions and 109 deletions
@@ -81,6 +81,11 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/boxWithJava/functions"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("constructor.kt")
public void testConstructor() throws Exception {
doTestWithJava("compiler/testData/codegen/boxWithJava/functions/constructor.kt");
}
@TestMetadata("referencesStaticInnerClassMethod.kt")
public void testReferencesStaticInnerClassMethod() throws Exception {
doTestWithJava("compiler/testData/codegen/boxWithJava/functions/referencesStaticInnerClassMethod.kt");