diff --git a/.idea/misc.xml b/.idea/misc.xml
index f4841373743..4b7f9f02540 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -24,7 +24,7 @@
http://www.w3.org/1999/xhtml
-
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 0c7183a2088..5356b63b8e4 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -11,20 +11,14 @@
-
+
-
-
-
-
+
+
-
-
-
-
-
+
@@ -247,8 +241,8 @@
-
+
@@ -256,13 +250,13 @@
-
+
-
+
@@ -280,7 +274,7 @@
-
+
@@ -289,7 +283,7 @@
-
+
@@ -307,7 +301,7 @@
-
+
@@ -353,91 +347,91 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -459,17 +453,14 @@
-
-
-
@@ -485,6 +476,7 @@
+
@@ -848,18 +840,60 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -992,12 +1026,22 @@
+
+
+
+
+
+
+
+
+
+
-
+
@@ -1011,9 +1055,9 @@
-
-
+
+
@@ -1032,140 +1076,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $PROJECT_DIR$/../j2k/src/org/jetbrains/jet/j2k/ast/Node.java
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -1293,6 +1204,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1305,14 +1245,6 @@
-
-
-
-
-
-
-
-
@@ -1351,17 +1283,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -1472,12 +1393,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
localhost
@@ -1533,18 +1454,15 @@
-
+
-
-
-
@@ -1553,12 +1471,15 @@
-
-
+
+
+
+
+
@@ -1598,7 +1519,7 @@
-
+
@@ -1611,7 +1532,6 @@
-
@@ -1636,6 +1556,7 @@
+
@@ -1645,120 +1566,116 @@
-
+
-
+
-
+
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -1806,7 +1723,7 @@
- IDEA IC-110.240
+ IDEA IC-112.544
@@ -1818,7 +1735,7 @@
- cli
+ backend
diff --git a/translator/src/org/jetbrains/k2js/translate/utils/DescriptorUtils.java b/translator/src/org/jetbrains/k2js/translate/utils/DescriptorUtils.java
index fead9bfe34e..b5eea0f0951 100644
--- a/translator/src/org/jetbrains/k2js/translate/utils/DescriptorUtils.java
+++ b/translator/src/org/jetbrains/k2js/translate/utils/DescriptorUtils.java
@@ -82,6 +82,7 @@ public final class DescriptorUtils {
+ " supposed to be exactly one " + name + " function.");
}
+ //TODO: some stange stuff happening to this method
@NotNull
public static PropertyDescriptor getPropertyByName(@NotNull JetScope scope,
@NotNull String name) {
@@ -89,6 +90,9 @@ public final class DescriptorUtils {
if (variable == null) {
variable = scope.getPropertyByFieldReference("$" + name);
}
+ Set variables = scope.getProperties(name);
+ assert variables.size() == 1;
+ variable = variables.iterator().next();
PropertyDescriptor descriptor = (PropertyDescriptor) variable;
assert descriptor != null : "Must have a descriptor.";
return descriptor;
diff --git a/translator/testFiles/examples/cases/generic.jet b/translator/testFiles/examples/cases/generic.jet
deleted file mode 100644
index a0101648ffa..00000000000
--- a/translator/testFiles/examples/cases/generic.jet
+++ /dev/null
@@ -1,22 +0,0 @@
-import java.util.*
-
-fun ArrayList.findAll(predicate: (T) -> Boolean): ArrayList {
- val result = ArrayList()
- for(val t in this) {
- if (predicate(t)) result.add(t)
- }
- return result
-}
-
-
-fun box(): String {
- val list: ArrayList = ArrayList()
-
- list.add(2)
- list.add(3)
- list.add(5)
-
-
- val m: ArrayList = list.findAll({(name: Int) -> name < 4})
- return if (m.size() == 2) "OK" else "fail"
-}