Update k2js and version of kotlin library
This commit is contained in:
committed by
unknown
parent
8780b2c2ab
commit
3fcd330a5a
@@ -354,4 +354,4 @@ public final class ExpressionVisitor extends TranslatorVisitor<JsNode> {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public final class DescriptorUtils {
|
||||
@NotNull String name) {
|
||||
VariableDescriptor variable = scope.getLocalVariable(name);
|
||||
if (variable == null) {
|
||||
variable = org.jetbrains.jet.lang.resolve.DescriptorUtils.filterNonExtensionProperty(scope.getProperties(name));
|
||||
variable = scope.getPropertyByFieldReference("$" + name);
|
||||
}
|
||||
PropertyDescriptor descriptor = (PropertyDescriptor) variable;
|
||||
assert descriptor != null : "Must have a descriptor.";
|
||||
@@ -126,8 +126,9 @@ public final class DescriptorUtils {
|
||||
return (functionDescriptor.getReceiverParameter().exists());
|
||||
}
|
||||
|
||||
//TODO: make "anonymous" a constant
|
||||
@NotNull
|
||||
public static String nameForNamespace(@NotNull NamespaceDescriptor descriptor) {
|
||||
public static String getNameForNamespace(@NotNull NamespaceDescriptor descriptor) {
|
||||
String name = descriptor.getName();
|
||||
if (name.equals("")) {
|
||||
return "Anonymous";
|
||||
|
||||
@@ -93,5 +93,29 @@ public class FunctionTest extends AbstractExpressionTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void implicitItParameter() throws Exception {
|
||||
testFooBoxIsTrue("implicitItParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void defaultParameters() throws Exception {
|
||||
testFooBoxIsTrue("defaultParameters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void functionLiteralAsLastParameter() throws Exception {
|
||||
testFooBoxIsTrue("functionLiteralAsLastParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void kt921() throws Exception {
|
||||
try {
|
||||
checkOutput("KT-921.kt", "");
|
||||
} catch (Throwable e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1028,4 +1028,4 @@ Kotlin.StringBuilder = Kotlin.Class.create(
|
||||
}
|
||||
}
|
||||
)
|
||||
}());
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user