to compileable state

This commit is contained in:
Dmitry Jemerov
2012-05-21 15:20:26 +02:00
committed by Pavel V. Talanov
parent 34da39c55b
commit 80e678e2ec
5 changed files with 6 additions and 30 deletions
+3 -1
View File
@@ -619,7 +619,7 @@
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="IDEA IC-117.117" project-jdk-type="IDEA JDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="IDEA IU-117.418" project-jdk-type="IDEA JDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="VcsDirectoryMappings">
@@ -644,10 +644,12 @@
<library name="KotlinRuntime">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime.jar!/src" />
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime.jar!/src" />
</SOURCES>
</library>
</component>
@@ -25,13 +25,6 @@ public class StarProjectionType extends Type {
@NotNull
@Override
public String toKotlin() {
G g = new G("");
G<String> g2 = new G<String>("");
return STAR;
}
}
class G<T extends String> {
public <T> G(T t) {
}
}
@@ -62,7 +62,7 @@ public class TypeVisitor extends PsiTypeVisitor<Type> implements J2KVisitor {
final IdentifierImpl identifier = new IdentifierImpl(name);
if (name.equals("void")) {
myResult = new PrimitiveType(new IdentifierImpl(JetStandardClasses.UNIT_ALIAS));
myResult = new PrimitiveType(new IdentifierImpl("Unit"));
}
else if (Node.PRIMITIVE_TYPES.contains(name)) {
myResult = new PrimitiveType(new IdentifierImpl(AstUtil.upperFirstCharacter(name)));
@@ -24,6 +24,7 @@ import junit.framework.Assert;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import kotlinc.internal.com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -86,7 +87,7 @@ public class StandaloneJavaToKotlinConverterTest extends TestCase {
tmp.delete();
}
Assert.assertEquals(expected, actual);
Assert.assertEquals(StringUtil.convertLineSeparators(expected), StringUtil.convertLineSeparators(actual));
}
@NotNull
@@ -1,20 +0,0 @@
package test
public open class Test(str : String?) {
var myStr : String? = "String2"
public open fun sout(str : String?) : Unit {
System.out?.println(str)
}
public open fun dummy(str : String?) : String? {
return str
}
public open fun test() : Unit {
sout("String")
var test : String? = "String2"
sout(test)
sout(dummy(test))
Test(test)
}
{
myStr = str
}
}