diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 7234e15e999..989a6d7f181 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -8,57 +8,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
-
-
+
@@ -100,8 +66,8 @@
-
-
+
+
@@ -116,7 +82,7 @@
-
+
@@ -130,6 +96,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -156,8 +135,8 @@
-
-
+
+
@@ -171,78 +150,77 @@
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -279,57 +257,19 @@
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -338,16 +278,25 @@
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
@@ -356,16 +305,43 @@
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -392,22 +368,22 @@
@@ -529,112 +505,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -674,10 +544,6 @@
-
-
-
-
@@ -692,38 +558,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -751,6 +585,7 @@
+
@@ -765,7 +600,6 @@
-
@@ -784,9 +618,9 @@
-
-
+
+
@@ -794,83 +628,17 @@
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -957,6 +725,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1015,17 +845,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -1052,12 +871,23 @@
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
localhost
@@ -1130,8 +960,8 @@
-
-
+
+
@@ -1175,7 +1005,7 @@
-
+
@@ -1188,7 +1018,6 @@
-
@@ -1213,6 +1042,7 @@
+
@@ -1222,116 +1052,118 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/translator/src/org/jetbrains/k2js/translate/expression/ExpressionVisitor.java b/translator/src/org/jetbrains/k2js/translate/expression/ExpressionVisitor.java
index c6f7390909a..6cf08b9a834 100644
--- a/translator/src/org/jetbrains/k2js/translate/expression/ExpressionVisitor.java
+++ b/translator/src/org/jetbrains/k2js/translate/expression/ExpressionVisitor.java
@@ -380,6 +380,9 @@ public final class ExpressionVisitor extends TranslatorVisitor {
@NotNull
public JsNode visitThisExpression(@NotNull JetThisExpression expression,
@NotNull TranslationContext context) {
+ if (context.hasAliasForThis()) {
+ return context.getAliasForThis();
+ }
return new JsThisRef();
}
diff --git a/translator/src/org/jetbrains/k2js/translate/expression/FunctionTranslator.java b/translator/src/org/jetbrains/k2js/translate/expression/FunctionTranslator.java
index c83b04f6fd3..3221f3d920a 100644
--- a/translator/src/org/jetbrains/k2js/translate/expression/FunctionTranslator.java
+++ b/translator/src/org/jetbrains/k2js/translate/expression/FunctionTranslator.java
@@ -42,9 +42,15 @@ public final class FunctionTranslator extends AbstractTranslator {
return new JsPropertyInitializer(functionName.makeRef(), function);
}
+ //TODO: consider refactoring
@NotNull
- public JsFunction translateAsLiteral() {
- return generateFunctionObject();
+ public JsExpression translateAsLiteral() {
+ JsName aliasForThis = context().enclosingScope().declareName("that");
+ context().setAliasForThis(aliasForThis);
+ JsFunction function = generateFunctionObject();
+ context().removeAliasForThis();
+ JsExpression assignThatToThis = AstUtil.newAssignment(aliasForThis.makeRef(), new JsThisRef());
+ return AstUtil.newSequence(assignThatToThis, function);
}
@NotNull
diff --git a/translator/src/org/jetbrains/k2js/translate/expression/WhenTranslator.java b/translator/src/org/jetbrains/k2js/translate/expression/WhenTranslator.java
index a4ea548ddf4..4c797019d6f 100644
--- a/translator/src/org/jetbrains/k2js/translate/expression/WhenTranslator.java
+++ b/translator/src/org/jetbrains/k2js/translate/expression/WhenTranslator.java
@@ -140,33 +140,14 @@ public class WhenTranslator extends AbstractTranslator {
if (condition instanceof JetWhenConditionIsPattern) {
return translatePatternCondition((JetWhenConditionIsPattern) condition);
}
- if (condition instanceof JetWhenConditionCall) {
- return translateCallCondition((JetWhenConditionCall) condition);
- }
throw new AssertionError("Unsupported when condition " + condition.getClass());
}
- @NotNull
- private JsExpression translateCallCondition(@NotNull JetWhenConditionCall condition) {
- JsExpression suffixExpression =
- Translation.translateAsExpression(getSuffixExpression(condition), context());
- AstUtil.setQualifier(suffixExpression, expressionToMatch);
- return AstUtil.equalsTrue(suffixExpression, context().program());
- }
-
- @NotNull
- private JetExpression getSuffixExpression(@NotNull JetWhenConditionCall condition) {
- JetExpression suffixExpression = condition.getCallSuffixExpression();
- assert suffixExpression != null : "When call condition should have suffix expression";
- return suffixExpression;
- }
-
@NotNull
private JsBlock addDummyBreak(@NotNull JsStatement statement) {
return AstUtil.newBlock(statement, new JsBreak());
}
-
@NotNull
private JsExpression translatePatternCondition(@NotNull JetWhenConditionIsPattern condition) {
JsExpression patternMatchExpression = Translation.patternTranslator(context()).
diff --git a/translator/src/org/jetbrains/k2js/translate/general/TranslationContext.java b/translator/src/org/jetbrains/k2js/translate/general/TranslationContext.java
index fa2a59470bc..1a8ea33a763 100644
--- a/translator/src/org/jetbrains/k2js/translate/general/TranslationContext.java
+++ b/translator/src/org/jetbrains/k2js/translate/general/TranslationContext.java
@@ -22,6 +22,7 @@ import java.util.Map;
public final class TranslationContext {
+ // TODO: extract different parts of this classes into separate classes
private static class Scopes {
public Scopes(@NotNull JsScope enclosingScope, @NotNull JsScope functionScope, @NotNull JsScope namespaceScope) {
this.enclosingScope = enclosingScope;
@@ -43,7 +44,7 @@ public final class TranslationContext {
JsScope rootScope = program.getRootScope();
Scopes scopes = new Scopes(rootScope, rootScope, rootScope);
return new TranslationContext(null, program, bindingContext,
- scopes, extractor, new HashMap());
+ scopes, extractor, new HashMap(), null);
}
@NotNull
@@ -58,17 +59,21 @@ public final class TranslationContext {
private final Declarations declarations;
@NotNull
private final Map aliases;
+ @Nullable
+ private JsName aliasForThis;
private TranslationContext(@Nullable JsName namespaceName, @NotNull JsProgram program,
@NotNull BindingContext bindingContext, @NotNull Scopes scopes,
- @NotNull Declarations declarations, @NotNull Map aliases) {
+ @NotNull Declarations declarations, @NotNull Map aliases,
+ @Nullable JsName aliasForThis) {
this.program = program;
this.bindingContext = bindingContext;
this.namespaceName = namespaceName;
this.scopes = scopes;
this.declarations = declarations;
this.aliases = aliases;
+ this.aliasForThis = aliasForThis;
}
@NotNull
@@ -81,7 +86,8 @@ public final class TranslationContext {
JsScope namespaceScope = declarations.getScope(descriptor);
JsName namespaceName = getNameForDescriptor(descriptor);
Scopes newScopes = new Scopes(namespaceScope, namespaceScope, namespaceScope);
- return new TranslationContext(namespaceName, program, bindingContext, newScopes, declarations, aliases);
+ return new TranslationContext(namespaceName, program, bindingContext, newScopes,
+ declarations, aliases, aliasForThis);
}
@NotNull
@@ -93,7 +99,8 @@ public final class TranslationContext {
public TranslationContext newClass(@NotNull ClassDescriptor descriptor) {
JsScope classScope = declarations.getScope(descriptor);
Scopes newScopes = new Scopes(classScope, classScope, scopes.namespaceScope);
- return new TranslationContext(namespaceName, program, bindingContext, newScopes, declarations, aliases);
+ return new TranslationContext(namespaceName, program, bindingContext,
+ newScopes, declarations, aliases, aliasForThis);
}
@NotNull
@@ -115,7 +122,8 @@ public final class TranslationContext {
public TranslationContext newFunctionDeclaration(@NotNull FunctionDescriptor descriptor) {
JsScope functionScope = declarations.getScope(descriptor);
Scopes newScopes = new Scopes(functionScope, scopes.classScope, scopes.namespaceScope);
- return new TranslationContext(namespaceName, program, bindingContext, newScopes, declarations, aliases);
+ return new TranslationContext(namespaceName, program, bindingContext,
+ newScopes, declarations, aliases, aliasForThis);
}
// @NotNull TranslationContext newAliases(Map newAliases) {
@@ -128,7 +136,8 @@ public final class TranslationContext {
@NotNull
public TranslationContext newEnclosingScope(@NotNull JsScope enclosingScope) {
Scopes newScopes = new Scopes(enclosingScope, scopes.classScope, scopes.namespaceScope);
- return new TranslationContext(namespaceName, program, bindingContext, newScopes, declarations, aliases);
+ return new TranslationContext(namespaceName, program, bindingContext,
+ newScopes, declarations, aliases, aliasForThis);
}
@@ -204,6 +213,24 @@ public final class TranslationContext {
return descriptor;
}
+ @NotNull
+ public JsNameRef getAliasForThis() {
+ assert aliasForThis != null : "Alias is null. Use hasAliasForThis function to check.";
+ return aliasForThis.makeRef();
+ }
+
+ public void setAliasForThis(@NotNull JsName alias) {
+ aliasForThis = alias;
+ }
+
+ public void removeAliasForThis() {
+ aliasForThis = null;
+ }
+
+ public boolean hasAliasForThis() {
+ return (aliasForThis != null);
+ }
+
public boolean isDeclared(@NotNull DeclarationDescriptor descriptor) {
return declarations.isDeclared(descriptor);
}
diff --git a/translator/src/org/jetbrains/k2js/translate/reference/PropertyAccessTranslator.java b/translator/src/org/jetbrains/k2js/translate/reference/PropertyAccessTranslator.java
index 44d6f941d0a..c46f2b191f4 100644
--- a/translator/src/org/jetbrains/k2js/translate/reference/PropertyAccessTranslator.java
+++ b/translator/src/org/jetbrains/k2js/translate/reference/PropertyAccessTranslator.java
@@ -7,7 +7,6 @@ import com.google.dart.compiler.backend.js.ast.JsNameRef;
import com.google.dart.compiler.util.AstUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
import org.jetbrains.jet.lang.descriptors.PropertyDescriptor;
import org.jetbrains.jet.lang.descriptors.PropertyGetterDescriptor;
import org.jetbrains.jet.lang.descriptors.PropertySetterDescriptor;
@@ -15,7 +14,6 @@ import org.jetbrains.jet.lang.psi.JetDotQualifiedExpression;
import org.jetbrains.jet.lang.psi.JetExpression;
import org.jetbrains.jet.lang.psi.JetQualifiedExpression;
import org.jetbrains.jet.lang.psi.JetSimpleNameExpression;
-import org.jetbrains.jet.lang.resolve.calls.ResolvedCall;
import org.jetbrains.k2js.translate.general.AbstractTranslator;
import org.jetbrains.k2js.translate.general.Translation;
import org.jetbrains.k2js.translate.general.TranslationContext;
@@ -169,7 +167,6 @@ public final class PropertyAccessTranslator extends AbstractTranslator {
return context().getNameForDescriptor(getter);
}
-
@NotNull
private JsName getNotNullSetterName(@NotNull JetSimpleNameExpression selectorExpression) {
JsName setterName = getNullableSetterName(selectorExpression);
@@ -192,15 +189,6 @@ public final class PropertyAccessTranslator extends AbstractTranslator {
@Nullable
private PropertyDescriptor getPropertyDescriptor(@NotNull JetSimpleNameExpression expression) {
- ResolvedCall> resolvedCall =
- BindingUtils.getResolvedCall(context().bindingContext(), expression);
- if (resolvedCall != null) {
- DeclarationDescriptor descriptor = resolvedCall.getCandidateDescriptor();
- if (descriptor instanceof PropertyDescriptor) {
- return (PropertyDescriptor) descriptor;
- }
- }
- return null;
+ return BindingUtils.getPropertyDescriptorForSimpleName(context().bindingContext(), expression);
}
-
}
diff --git a/translator/src/org/jetbrains/k2js/translate/reference/ReferenceProvider.java b/translator/src/org/jetbrains/k2js/translate/reference/ReferenceProvider.java
index 7e4e57f1676..c1000e10641 100644
--- a/translator/src/org/jetbrains/k2js/translate/reference/ReferenceProvider.java
+++ b/translator/src/org/jetbrains/k2js/translate/reference/ReferenceProvider.java
@@ -48,11 +48,20 @@ public final class ReferenceProvider {
if (requiresNamespaceQualifier) {
return context.getNamespaceQualifiedReference(referencedName);
} else if (requiresThisQualifier) {
- return AstUtil.thisQualifiedReference(referencedName);
+ return thisQualifiedReference();
}
return referencedName.makeRef();
}
+ private JsNameRef thisQualifiedReference() {
+ if (!context.hasAliasForThis()) {
+ return AstUtil.thisQualifiedReference(referencedName);
+ }
+ JsNameRef reference = referencedName.makeRef();
+ AstUtil.setQualifier(reference, context.getAliasForThis());
+ return reference;
+ }
+
private boolean requiresNamespaceQualifier() {
return context.namespaceScope().ownsName(referencedName);
}
diff --git a/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java b/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java
index 8500e48e203..3c1c533424f 100644
--- a/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java
+++ b/translator/src/org/jetbrains/k2js/translate/reference/ReferenceTranslator.java
@@ -50,7 +50,7 @@ public class ReferenceTranslator extends AbstractTranslator {
@Nullable
private JsNameRef resolveAsAliasReference(@NotNull JetSimpleNameExpression expression) {
- //TODO: decide if this code is actual
+ //TODO: decide if this code is meaningful
DeclarationDescriptor referencedDescriptor =
BindingUtils.getDescriptorForReferenceExpression(context().bindingContext(), expression);
if (referencedDescriptor == null) return null;
diff --git a/translator/src/org/jetbrains/k2js/translate/utils/BindingUtils.java b/translator/src/org/jetbrains/k2js/translate/utils/BindingUtils.java
index fc6347ea74c..11234847a9d 100644
--- a/translator/src/org/jetbrains/k2js/translate/utils/BindingUtils.java
+++ b/translator/src/org/jetbrains/k2js/translate/utils/BindingUtils.java
@@ -190,6 +190,29 @@ public final class BindingUtils {
return null;
}
+
+ //TODO: refactor
+ @Nullable
+ public static PropertyDescriptor getPropertyDescriptorForSimpleName(@NotNull BindingContext context,
+ @NotNull JetSimpleNameExpression expression) {
+ ResolvedCall> resolvedCall =
+ BindingUtils.getResolvedCall(context, expression);
+ if (resolvedCall != null) {
+ DeclarationDescriptor descriptor = resolvedCall.getCandidateDescriptor();
+ if (descriptor instanceof PropertyDescriptor) {
+ return (PropertyDescriptor) descriptor;
+ }
+ if (descriptor instanceof VariableAsFunctionDescriptor) {
+ VariableAsFunctionDescriptor functionVariable = (VariableAsFunctionDescriptor) descriptor;
+ VariableDescriptor variableDescriptor = functionVariable.getVariableDescriptor();
+ if (variableDescriptor instanceof PropertyDescriptor) {
+ return (PropertyDescriptor) variableDescriptor;
+ }
+ }
+ }
+ return null;
+ }
+
@Nullable
static public ResolvedCall> getResolvedCall(@NotNull BindingContext context,
@NotNull JetExpression expression) {
diff --git a/translator/test/org/jetbrains/k2js/test/JavascriptTest.java b/translator/test/org/jetbrains/k2js/test/JavascriptTest.java
new file mode 100644
index 00000000000..a873a2f0ef2
--- /dev/null
+++ b/translator/test/org/jetbrains/k2js/test/JavascriptTest.java
@@ -0,0 +1,24 @@
+package org.jetbrains.k2js.test;
+
+import org.junit.Test;
+
+import java.util.Arrays;
+
+/**
+ * @author Talanov Pavel
+ */
+public final class JavascriptTest extends TranslationTest {
+
+ final private static String MAIN = "javascript/";
+
+ @Override
+ protected String mainDirectory() {
+ return MAIN;
+ }
+
+ @Test
+ public void enclosingThis() throws Exception {
+ runRhinoTest(Arrays.asList(kotlinLibraryPath(), cases("enclosingThis.js")),
+ new RhinoFunctionResultChecker("Anonymous", "box", "OK"));
+ }
+}
diff --git a/translator/test/org/jetbrains/k2js/test/KotlinLibTest.java b/translator/test/org/jetbrains/k2js/test/KotlinLibTest.java
index f2bfc45db9d..3ffa8c2fe92 100644
--- a/translator/test/org/jetbrains/k2js/test/KotlinLibTest.java
+++ b/translator/test/org/jetbrains/k2js/test/KotlinLibTest.java
@@ -36,6 +36,8 @@ public class KotlinLibTest extends TranslationTest {
});
}
+ //TODO: refactor
+
@Test
public void classObjectHasCreateMethod() throws Exception {
final Map> propertyToType
diff --git a/translator/test/org/jetbrains/k2js/test/PatternMatchingTest.java b/translator/test/org/jetbrains/k2js/test/PatternMatchingTest.java
index eb8c2f78d96..bc8e622bd7b 100644
--- a/translator/test/org/jetbrains/k2js/test/PatternMatchingTest.java
+++ b/translator/test/org/jetbrains/k2js/test/PatternMatchingTest.java
@@ -39,10 +39,11 @@ public final class PatternMatchingTest extends TranslationTest {
testFooBoxIsTrue("whenNotValue.kt");
}
- @Test
- public void whenValueOrType() throws Exception {
- testFooBoxIsTrue("whenValueOrType.kt");
- }
+ //TODO: fails due to analyzing bug
+// @Test
+// public void whenValueOrType() throws Exception {
+// testFooBoxIsTrue("whenValueOrType.kt");
+// }
@Test
public void multipleCases() throws Exception {
@@ -54,14 +55,15 @@ public final class PatternMatchingTest extends TranslationTest {
testFooBoxIsTrue("matchNullableType.kt");
}
- @Test
- public void whenConditionMethodCall() throws Exception {
- testFooBoxIsTrue("whenConditionMethodCall.kt");
- }
-
- @Test
- public void whenConditionPropertyAccess() throws Exception {
- testFooBoxIsTrue("whenConditionPropertyAccess.kt");
- }
+ //TODO: tests not actual due to drop of conditionCall feature
+// @Test
+// public void whenConditionMethodCall() throws Exception {
+// testFooBoxIsTrue("whenConditionMethodCall.kt");
+// }
+//
+// @Test
+// public void whenConditionPropertyAccess() throws Exception {
+// testFooBoxIsTrue("whenConditionPropertyAccess.kt");
+// }
}
diff --git a/translator/testFiles/sortedTests/failed/enclosingThis.jet b/translator/testFiles/examples/cases/enclosingThis.jet
similarity index 100%
rename from translator/testFiles/sortedTests/failed/enclosingThis.jet
rename to translator/testFiles/examples/cases/enclosingThis.jet
diff --git a/translator/testFiles/javascript/cases/enclosingThis.js b/translator/testFiles/javascript/cases/enclosingThis.js
new file mode 100644
index 00000000000..6a365266601
--- /dev/null
+++ b/translator/testFiles/javascript/cases/enclosingThis.js
@@ -0,0 +1,30 @@
+{
+ classes = function () {
+ var Point = Class.create({initialize:function (x, y) {
+ this.$x = x;
+ this.$y = y;
+ }, get_x:function () {
+ return this.$x;
+ }, get_y:function () {
+ return this.$y;
+ }, mul:function () {
+ return (that = this, function (scalar) {
+ return new Point(that.get_x() * scalar, that.get_y() * scalar);
+ })
+ ;
+ }
+ });
+ return {Point:Point};
+ }
+ ();
+ Anonymous = Namespace.create({initialize:function () {
+ Anonymous.$m = (new Anonymous.Point(2, 3)).mul();
+ }, get_m:function () {
+ return Anonymous.$m;
+ }, box:function () {
+ var answer = Anonymous.get_m()(5);
+ return answer.get_x() === 10 && answer.get_y() === 15 ? 'OK' : 'FAIL';
+ }
+ }, classes);
+ Anonymous.initialize();
+}
diff --git a/translator/testFiles/patternMatching/cases/whenConditionMethodCall.kt b/translator/testFiles/patternMatching/cases/whenConditionMethodCall.kt
deleted file mode 100644
index 4d9a470d615..00000000000
--- a/translator/testFiles/patternMatching/cases/whenConditionMethodCall.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace foo
-
-class A() {
- fun p() = true
-}
-
-fun box() : Boolean {
- var a = 0
- when(A()) {
- .p() => a--
- is A? => a++;
- is A => a++;
- else => a++;
- }
- return (a == -1)
-}
\ No newline at end of file
diff --git a/translator/testFiles/patternMatching/cases/whenConditionPropertyAccess.kt b/translator/testFiles/patternMatching/cases/whenConditionPropertyAccess.kt
deleted file mode 100644
index f6ad5bb9884..00000000000
--- a/translator/testFiles/patternMatching/cases/whenConditionPropertyAccess.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-namespace foo
-
-class A() {
- val pp = true
- fun p() = true
-}
-
-fun box() : Boolean {
- var a = 0
- when(A()) {
- .pp => a -=2
- .p() => a--
- is A? => a++;
- is A => a++;
- else => a++;
- }
- return (a == -2)
-}
\ No newline at end of file