Merge remote branch 'origin/master'
This commit is contained in:
@@ -4,6 +4,7 @@ examples/.idea/workspace.xml
|
||||
confluence/target
|
||||
confluence/target
|
||||
out
|
||||
ideaSDK
|
||||
.idea/dictionaries/yozh.xml
|
||||
.idea/codeStyleSettings.xml
|
||||
.idea/workspace.xml
|
||||
|
||||
Generated
+8
@@ -34,6 +34,14 @@
|
||||
<maximumStackSize value="2" />
|
||||
<properties />
|
||||
</buildFile>
|
||||
<buildFile url="file://$PROJECT_DIR$/update_dependencies.xml">
|
||||
<additionalClassPath />
|
||||
<antReference projectDefault="true" />
|
||||
<customJdkName value="" />
|
||||
<maximumHeapSize value="128" />
|
||||
<maximumStackSize value="2" />
|
||||
<properties />
|
||||
</buildFile>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
|
||||
Generated
+10
@@ -0,0 +1,10 @@
|
||||
<component name="libraryTable">
|
||||
<library name="idea-full">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
||||
Generated
+10
@@ -0,0 +1,10 @@
|
||||
<component name="libraryTable">
|
||||
<library name="intellij-core">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/core" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/core" recursive="false" />
|
||||
</library>
|
||||
</component>
|
||||
Generated
+24
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="IDEA" type="Application" factoryName="Application">
|
||||
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
|
||||
<option name="VM_PARAMETERS" value="-Xmx500m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=250m -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system -Didea.config.path=../config" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="idea" />
|
||||
<envs />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
<option name="LOCAL" value="true" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -2,7 +2,10 @@
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/ideaSDK/config" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/ideaSDK/system" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="IDEA 10.x" jdkType="IDEA JDK" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="frontend" />
|
||||
<orderEntry type="module" module-name="frontend.java" />
|
||||
<orderEntry type="library" name="asm" level="project" />
|
||||
<orderEntry type="module" module-name="stdlib" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="intellij-core" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="IDEA 10.x" jdkType="IDEA JDK" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="backend" />
|
||||
<orderEntry type="module" module-name="frontend" />
|
||||
<orderEntry type="module" module-name="frontend.java" />
|
||||
<orderEntry type="module" module-name="stdlib" />
|
||||
<orderEntry type="module" module-name="jet.as.java.psi" />
|
||||
<orderEntry type="library" name="intellij-core" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="IDEA 10.x" jdkType="IDEA JDK" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="frontend" />
|
||||
<orderEntry type="module" module-name="stdlib" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="intellij-core" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="IDEA 10.x" jdkType="IDEA JDK" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="intellij-core" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -50,16 +50,6 @@ class String() : Comparable<String> {
|
||||
fun plus(other : Any?) : String
|
||||
|
||||
fun equals(other : Any?) : Boolean
|
||||
fun equalsIgnoreCase(other: String?) : Boolean
|
||||
|
||||
fun substring(start: Int): String
|
||||
fun substring(start: Int, end: Int): String
|
||||
|
||||
fun startsWith(prefix: String, toffset: Int): Boolean
|
||||
fun startsWith(prefix: String): Boolean
|
||||
fun endsWith(suffix: String): Boolean
|
||||
|
||||
fun trim(): String
|
||||
}
|
||||
|
||||
|
||||
|
||||
+12
-2
@@ -20,7 +20,10 @@ import org.jetbrains.jet.lang.resolve.scopes.receivers.ExpressionReceiver;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.receivers.TransientReceiver;
|
||||
import org.jetbrains.jet.lang.types.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static org.jetbrains.jet.lang.diagnostics.Errors.*;
|
||||
import static org.jetbrains.jet.lang.resolve.BindingContext.*;
|
||||
@@ -182,7 +185,14 @@ public class ControlStructureTypingVisitor extends ExpressionTypingVisitor {
|
||||
else if (body != null) {
|
||||
WritableScope writableScope = newWritableScopeImpl(context).setDebugName("do..while body scope");
|
||||
conditionScope = writableScope;
|
||||
context.getServices().getBlockReturnedTypeWithWritableScope(writableScope, Collections.singletonList(body), CoercionStrategy.NO_COERCION, context);
|
||||
List<JetElement> block;
|
||||
if (body instanceof JetBlockExpression) {
|
||||
block = ((JetBlockExpression)body).getStatements();
|
||||
}
|
||||
else {
|
||||
block = Collections.<JetElement>singletonList(body);
|
||||
}
|
||||
context.getServices().getBlockReturnedTypeWithWritableScope(writableScope, block, CoercionStrategy.NO_COERCION, context);
|
||||
}
|
||||
JetExpression condition = expression.getCondition();
|
||||
checkCondition(conditionScope, condition, context);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package mask
|
||||
|
||||
import std.io.*
|
||||
import java.io.*
|
||||
import java.util.*
|
||||
import java.util.Iterator as It
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package mask
|
||||
|
||||
import std.io.*
|
||||
import java.io.*
|
||||
import java.util.*
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package mask
|
||||
|
||||
import std.io.*
|
||||
import java.io.*
|
||||
import java.util.*
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import std.io.*
|
||||
import std.util.*
|
||||
import java.io.*
|
||||
import java.util.*
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package Smoke
|
||||
|
||||
import std.io.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
print(args)
|
||||
}
|
||||
|
||||
@@ -8,4 +8,6 @@ fun test(s: String?) {
|
||||
val e: String = <!TYPE_MISMATCH!>s?.length<!> ?: "empty"
|
||||
val <!UNUSED_VARIABLE!>f<!>: Int = s?.length ?: b ?: 1
|
||||
val <!UNUSED_VARIABLE!>g<!>: Int? = e? startsWith("s")?.length
|
||||
}
|
||||
}
|
||||
|
||||
fun String.startsWith(<!UNUSED_PARAMETER!>s<!>: String): Boolean = true
|
||||
@@ -0,0 +1,16 @@
|
||||
//KT-1078 Problem with visibility in do-while
|
||||
|
||||
package kt1078
|
||||
|
||||
fun test() : B {
|
||||
do {
|
||||
val x = foo()
|
||||
} while(x.bar()) // x is not visible here!
|
||||
return B()
|
||||
}
|
||||
|
||||
class B() {
|
||||
fun bar() = true
|
||||
}
|
||||
|
||||
fun foo() = B()
|
||||
@@ -5,13 +5,14 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$" isTestSource="true" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="IDEA 10.x" jdkType="IDEA JDK" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="backend" />
|
||||
<orderEntry type="module" module-name="frontend" />
|
||||
<orderEntry type="module" module-name="frontend.java" />
|
||||
<orderEntry type="module" module-name="stdlib" />
|
||||
<orderEntry type="module" module-name="cli" />
|
||||
<orderEntry type="library" name="idea-full" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -191,12 +191,6 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
// System.out.println(generateToText());
|
||||
}
|
||||
|
||||
public void testKt344 () throws Exception {
|
||||
loadFile("regressions/kt344.jet");
|
||||
// System.out.println(generateToText());
|
||||
blackBox();
|
||||
}
|
||||
|
||||
public void testKt508 () throws Exception {
|
||||
loadFile("regressions/kt508.jet");
|
||||
System.out.println(generateToText());
|
||||
|
||||
@@ -26,10 +26,6 @@ public class ExtensionFunctionsTest extends CodegenTestCase {
|
||||
assertThrows(foo, Exception.class, null, new StringBuilder());
|
||||
}
|
||||
|
||||
public void testGeneric() throws Exception {
|
||||
blackBoxFile("extensionFunctions/generic.jet");
|
||||
}
|
||||
|
||||
public void testVirtual() throws Exception {
|
||||
blackBoxFile("extensionFunctions/virtual.jet");
|
||||
}
|
||||
|
||||
@@ -503,19 +503,6 @@ public class NamespaceGenTest extends CodegenTestCase {
|
||||
assertEquals("aaa", tuple4._3);
|
||||
}
|
||||
|
||||
public void testPredicateOperator() throws Exception {
|
||||
loadText("fun foo(s: String) = s?startsWith(\"J\")");
|
||||
final Method main = generateFunction();
|
||||
try {
|
||||
assertEquals("JetBrains", main.invoke(null, "JetBrains"));
|
||||
assertNull(main.invoke(null, "IntelliJ"));
|
||||
}
|
||||
catch (Throwable t) {
|
||||
// System.out.println(generateToText());
|
||||
t.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void testEscapeSequence() throws Exception {
|
||||
loadText("fun foo() = \"a\\nb\\$\"");
|
||||
final Method main = generateFunction();
|
||||
|
||||
@@ -4,6 +4,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.compiler.CompileEnvironment;
|
||||
import org.jetbrains.jet.compiler.CompileSession;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* @author alex.tkachman
|
||||
*/
|
||||
@@ -83,4 +85,29 @@ public class StdlibTest extends CodegenTestCase {
|
||||
public void testKt274 () {
|
||||
// blackBoxFile("regressions/kt274.kt");
|
||||
}
|
||||
|
||||
//from ClassGenTest
|
||||
public void testKt344 () throws Exception {
|
||||
loadFile("regressions/kt344.jet");
|
||||
// System.out.println(generateToText());
|
||||
blackBox();
|
||||
}
|
||||
|
||||
//from ExtensionFunctionsTest
|
||||
public void testGeneric() throws Exception {
|
||||
blackBoxFile("extensionFunctions/generic.jet");
|
||||
}
|
||||
|
||||
//from NamespaceGenTest
|
||||
public void testPredicateOperator() throws Exception {
|
||||
loadText("fun foo(s: String) = s?startsWith(\"J\")");
|
||||
final Method main = generateFunction();
|
||||
try {
|
||||
assertEquals("JetBrains", main.invoke(null, "JetBrains"));
|
||||
assertNull(main.invoke(null, "IntelliJ"));
|
||||
} catch (Throwable t) {
|
||||
// System.out.println(generateToText());
|
||||
t.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,8 +5,9 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="IDEA 10.x" jdkType="IDEA JDK" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="intellij-core" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PLUGIN_MODULE" version="4">
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="DevKit.ModuleBuildProperties" url="file://$MODULE_DIR$/src/META-INF/plugin.xml" />
|
||||
<component name="EclipseModuleManager">
|
||||
<libelement value="jar://$MODULE_DIR$/../lib/asm-util-3.3.1.jar!/" />
|
||||
@@ -15,7 +15,7 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="IDEA 10.x" jdkType="IDEA JDK" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="backend" />
|
||||
<orderEntry type="module" module-name="frontend" />
|
||||
@@ -23,6 +23,7 @@
|
||||
<orderEntry type="module" module-name="stdlib" />
|
||||
<orderEntry type="module" module-name="compiler-tests" />
|
||||
<orderEntry type="module" module-name="jet.as.java.psi" />
|
||||
<orderEntry type="library" name="idea-full" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -8,4 +8,6 @@ fun test(s: String?) {
|
||||
val e: String = <error>s?.length</error> ?: "empty"
|
||||
val <warning>f</warning>: Int = s?.length ?: b ?: 1
|
||||
val <warning>g</warning>: Int? = e? startsWith("s")?.length
|
||||
}
|
||||
}
|
||||
|
||||
fun String.startsWith(<warning>s</warning>: String): Boolean = true
|
||||
@@ -8,6 +8,8 @@ inline fun String.lastIndexOf(s: String) = (this as java.lang.String).lastIndex
|
||||
|
||||
inline fun String.lastIndexOf(s: Char) = (this as java.lang.String).lastIndexOf(s.toString())
|
||||
|
||||
inline fun String.equalsIgnoreCase(s: String) = (this as java.lang.String).equalsIgnoreCase(s)
|
||||
|
||||
inline fun String.indexOf(s : String) = (this as java.lang.String).indexOf(s)
|
||||
|
||||
inline fun String.indexOf(p0 : String, p1 : Int) = (this as java.lang.String).indexOf(p0, p1)
|
||||
@@ -34,6 +36,10 @@ inline fun String.substring(i : Int) = (this as java.lang.String).substring(i).s
|
||||
|
||||
inline fun String.substring(i0 : Int, i1 : Int) = (this as java.lang.String).substring(i0, i1).sure()
|
||||
|
||||
inline fun String.startsWith(prefix: String) = (this as java.lang.String).startsWith(prefix)
|
||||
|
||||
inline fun String.startsWith(prefix: String, toffset: Int) = (this as java.lang.String).startsWith(prefix, toffset)
|
||||
|
||||
inline val String.size : Int
|
||||
get() = length()
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<project name="Update Dependencies" default="update">
|
||||
<property name="build.zip" value="ideaIC-112.SNAPSHOT.win.zip"/>
|
||||
|
||||
<target name="update">
|
||||
<execute_update/>
|
||||
</target>
|
||||
|
||||
<target name="jb_update">
|
||||
<execute_update teamcity="http://buildserver.labs.intellij.net" teamcity.build="bt662"/>
|
||||
</target>
|
||||
|
||||
<macrodef name="execute_update">
|
||||
<attribute name="teamcity" default="http://teamcity.jetbrains.com"/>
|
||||
<attribute name="teamcity.build" default="bt343"/>
|
||||
<sequential>
|
||||
<property name="core" value="ideaSDK/core"/>
|
||||
<property name="tc" value="@{teamcity}/guestAuth/repository/download/@{teamcity.build}/.lastSuccessful"/>
|
||||
<delete dir="ideaSDK" failonerror="false">
|
||||
<exclude name="config/**"/>
|
||||
<exclude name="system/**"/>
|
||||
</delete>
|
||||
<mkdir dir="${core}"/>
|
||||
<get src="${tc}/core/intellij-core.jar" dest="${core}"/>
|
||||
<get src="${tc}/core/annotations.jar" dest="${core}"/>
|
||||
<get src="${tc}/core/asm.jar" dest="${core}"/>
|
||||
<get src="${tc}/core/asm-commons.jar" dest="${core}"/>
|
||||
<get src="${tc}/core/cli-10.jar" dest="${core}"/>
|
||||
<get src="${tc}/core/guava-r09.jar" dest="${core}"/>
|
||||
<get src="${tc}/core/picocontainer.jar" dest="${core}"/>
|
||||
<get src="${tc}/core/trove4j.jar" dest="${core}"/>
|
||||
|
||||
<get src="${tc}/${build.zip}" dest="ideaSDK" />
|
||||
<unzip src="ideaSDK/${build.zip}" dest="ideaSDK"/>
|
||||
<delete file="ideaSDK/${build.zip}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</project>
|
||||
Reference in New Issue
Block a user