Wrong receiver is generated for variable-as-function call on object.

Move 'generateExpressionForReferencedDescriptor' to CallGenerator,
use it in 'generateCall',
add PSI-free versions of some utility methods so that call elements can
be generated when we're already deep in ResolvedCall generation
and have forgotten about PSI.
This commit is contained in:
Dmitry Petrov
2017-03-02 15:55:38 +03:00
parent d573962259
commit 634d9834de
8 changed files with 137 additions and 66 deletions
@@ -590,6 +590,12 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
doTest(fileName);
}
@TestMetadata("objectAsCallable.kt")
public void testObjectAsCallable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/objectAsCallable.kt");
doTest(fileName);
}
@TestMetadata("objectClassReference.kt")
public void testObjectClassReference() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/objectClassReference.kt");