KT-11823 Generate proper argument for closure constructor for this as a free variable. Give some explanation for function that generates closure arguments as well as a clear name. Give explanation to some code in UsageTracker.isSingletonReceiver, augmented by a test case.

This commit is contained in:
Alexey Andreev
2016-04-21 14:57:39 +03:00
parent ab79deacbd
commit 1764000bf4
10 changed files with 98 additions and 11 deletions
@@ -173,7 +173,7 @@ public final class ClosureTest extends SingleFileTranslationTest {
}
// TODO: tests UsageTracker but encounters issue somewhere else. Uncomment when issue with `this` generation gets fixed
// Presumably, KT-11823
// Presumably, KT-11996
/*public void testDeepInnerClassInLocalClass() throws Exception {
checkFooBoxIsOk();
}
@@ -185,4 +185,8 @@ public final class ClosureTest extends SingleFileTranslationTest {
public void testImplicitGenericReceiverInExtensionInLocalClass() throws Exception {
checkFooBoxIsOk();
}
public void testClosureThisInLambdaInsideObject() throws Exception {
checkFooBoxIsOk();
}
}
@@ -78,6 +78,14 @@ public class NestedTypesTest extends SingleFileTranslationTest {
checkFooBoxIsOk();
}
public void testImplicitOuterThisFromLambda() throws Exception {
checkFooBoxIsOk();
}
public void testImplicitOuterThisFromLocalClass() throws Exception {
checkFooBoxIsOk();
}
@NotNull
@Override
protected List<String> additionalJsFiles(@NotNull EcmaVersion ecmaVersion) {