Delete traces of "jet" in test data and unimportant code

This commit is contained in:
Alexander Udalov
2015-01-13 12:11:56 +03:00
parent 8a77fca449
commit f3b2193afd
21 changed files with 32 additions and 33 deletions
@@ -115,8 +115,8 @@ public class CodegenTestsOnAndroidRunner {
[exec] at org.jetbrains.kotlin.android.tests.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:35)
[exec] ... 13 more
[exec] Caused by: java.lang.VerifyError: compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage$t6$foo$1
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.t6(dummy.jet:94)
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.box(dummy.jet:185)
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.t6(dummy.kt:94)
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.box(dummy.kt:185)
[exec] ... 16 more
[exec] ...............
[exec] Error in testKt529:
@@ -91,8 +91,8 @@ public class SpecialFiles {
excludedFiles.add("kt529.kt"); // Bug
excludedFiles.add("kt344.kt"); // Bug
excludedFiles.add("comparisonWithNullCallsFun.kt"); // java.lang.NoClassDefFoundError: jet.Nothing
excludedFiles.add("kt3574.kt"); // java.lang.NoClassDefFoundError: jet.Nothing
excludedFiles.add("comparisonWithNullCallsFun.kt"); // java.lang.NoClassDefFoundError: kotlin.Nothing
excludedFiles.add("kt3574.kt"); // java.lang.NoClassDefFoundError: kotlin.Nothing
excludedFiles.add("genericBackingFieldSignature.kt"); // Wrong signature after package renaming
excludedFiles.add("genericMethodSignature.kt"); // Wrong signature after package renaming
@@ -4,5 +4,5 @@ class A {
fun box(): String {
val a = A()
return a.f() // does not work: (in runtime) ClassCastException: A cannot be cast to jet.Function0
return a.f() // does not work: (in runtime) ClassCastException: A cannot be cast to kotlin.Function0
}
@@ -1,4 +1,4 @@
// java.lang.ClassNotFoundException: jet.Nothing
// java.lang.ClassNotFoundException: kotlin.Nothing
var currentAccountId: Int? by SessionAccessor()
class SessionAccessor<T> {
@@ -1,5 +1,5 @@
fun box(): String {
// jet.Nothing should not be loaded here
// kotlin.Nothing should not be loaded here
val x = "" is Nothing
return "OK"
}
@@ -1,6 +1,5 @@
fun box(): String {
// This used to be problematic because of an attempt to load jet/Nothing class
// This used to be problematic because of an attempt to load kotlin/Nothing class
val x = "" is Nothing?
return "OK"
}
@@ -4,7 +4,7 @@ import java.io.*
import java.util.*
fun box() : String {
val input = StringReader("/Users/abreslav/work/jet/docs/luhnybin/src/test")
val input = StringReader("/aaa/bbb/ccc/ddd")
val luhny = Luhny()
input.forEachChar {
@@ -86,7 +86,7 @@ class Luhny() {
toBeMasked--
}
else {
print(c)
// print(c)
}
}
}
@@ -4,7 +4,7 @@ import java.io.*
import java.util.*
fun box() : String {
val input = StringReader("/Users/abreslav/work/jet/docs/luhnybin/src/test")
val input = StringReader("/aaa/bbb/ccc/ddd")
val luhny = Luhny()
input.forEachChar {
@@ -81,7 +81,7 @@ class Luhny() {
kotlin.io.print('X')
toBeMasked--
} else {
kotlin.io.print(c)
// kotlin.io.print(c)
}
}
}
@@ -4,7 +4,7 @@ import java.io.*
import java.util.*
fun box() : String {
val input = StringReader("/Users/abreslav/work/jet/docs/luhnybin/src/test")
val input = StringReader("/aaa/bbb/ccc/ddd")
val luhny = Luhny()
input.forEachChar {
@@ -79,7 +79,7 @@ class Luhny() {
toBeMasked--
}
else {
print(c)
// print(c)
}
}
}
@@ -2,7 +2,7 @@ open class X(val s: String)
fun f(a: String?) {
if (a != null) {
object : X(<!DEBUG_INFO_SMARTCAST!>a<!>) { // Type mismatch: inferred type is jet.String? but jet.String was expected
object : X(<!DEBUG_INFO_SMARTCAST!>a<!>) { // Type mismatch: inferred type is kotlin.String? but kotlin.String was expected
}
}
}
}
@@ -6,8 +6,8 @@ public fun foo<E>(array: Array<E>): Array<E> = array
public fun test()
{
val x = foo(array(1, 2, 3, 4, 5)) // Should infer type 'Int'
// ^--- public final fun <T : jet.Any? > array(vararg t : DONT_CARE) : jet.Array<DONT_CARE> defined in Kotlin
// ^--- public final fun <E : jet.Any? > foo(items t : jet.Array<DONT_CARE>) : jet.Array<DONT_CARE> defined in root package
// ^--- public final fun <T : kotlin.Any? > array(vararg t : DONT_CARE) : kotlin.Array<DONT_CARE> defined in Kotlin
// ^--- public final fun <E : kotlin.Any? > foo(items t : kotlin.Array<DONT_CARE>) : kotlin.Array<DONT_CARE> defined in root package
x : Array<Int>
}
@@ -18,7 +18,7 @@ fun test() {
val mapperFunction = {(i: Int)-> }
SomeTemplate().query(mapperFunction)
// TYPE_MISMATCH: Required Class<[ERROR: CANT_INFER]>, Found (jet.Int) -> Unit
// TYPE_MISMATCH: Required Class<[ERROR: CANT_INFER]>, Found (kotlin.Int) -> Unit
SomeTemplate().query {(i: Int)-> }
SomeTemplate().query1 {(i: Int)-> }
}
}
@@ -1,4 +1,4 @@
//KT-2394 java.lang.Iterable<T> should be visible as jet.Iterable<out T>
//KT-2394 java.lang.Iterable<T> should be visible as kotlin.Iterable<out T>
package d
fun foo(iterable: Iterable<Int>, iterator: Iterator<Int>, comparable: Comparable<Any>) {
@@ -2,10 +2,10 @@ fun main(args: Array<String>) {
val b: Boolean? = null
if (b != null) {
if (!<!DEBUG_INFO_SMARTCAST!>b<!>) {} // OK
if (<!DEBUG_INFO_SMARTCAST!>b<!>) {} // Error: Condition must be of type jet.Boolean, but is of type jet.Boolean?
if (b<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>) {} // WARN: Unnecessary non-null assertion (!!) on a non-null receiver of type jet.Boolean?
if (<!DEBUG_INFO_SMARTCAST!>b<!>) {} // Error: Condition must be of type kotlin.Boolean, but is of type kotlin.Boolean?
if (b<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>) {} // WARN: Unnecessary non-null assertion (!!) on a non-null receiver of type kotlin.Boolean?
foo(<!DEBUG_INFO_SMARTCAST!>b<!>) // OK
}
}
fun foo(a: Boolean) = a
fun foo(a: Boolean) = a
@@ -1,5 +1,5 @@
// FILE: main.kt
//KT-2376 java.lang.Number should be visible in Kotlin as jet.Number
//KT-2376 java.lang.Number should be visible in Kotlin as kotlin.Number
fun main(args: Array<String>) {
Test().number(5.toInt())
}
@@ -8,7 +8,7 @@ object A {
fun toJson2(obj:Any){
if(obj is SelfJson){
// A.find( (obj as SelfJson).javaClass) // OK
A.find( <!DEBUG_INFO_SMARTCAST!>obj<!>.javaClass ) // ERROR: Type mismatch: inferred type is jet.Any but SelfJson was expected
A.find( <!DEBUG_INFO_SMARTCAST!>obj<!>.javaClass ) // ERROR: Type mismatch: inferred type is kotlin.Any but SelfJson was expected
}
}
}
@@ -1,4 +1,4 @@
//FILE:mainFile.jet
//FILE:mainFile.kt
//----------------------------------------------------------------------------------
package test
@@ -1,4 +1,4 @@
//FILE:mainFile.jet
//FILE:mainFile.kt
//----------------------------------------------------------------------------------
package test
@@ -122,7 +122,7 @@ fun ModuleBuilder.defineModules() {
// Standard extensions are registered, adding custom ones
source mask "*.jav" language java // Non-standard extension for Java
source mask "*.jet" language kotlin
source mask "*.kt" language kotlin
resource mask "*.bundle"
module ("org.example.mymodule") {
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.Nullable;
public class JetRunConfigurationSettingsFormatConverterProvider extends ConverterProvider {
protected JetRunConfigurationSettingsFormatConverterProvider() {
super("jet-run-configuration-should-store-its-settings-as-java-app-configuration");
super("kotlin-run-configuration-should-store-its-settings-as-java-run-configuration");
}
@NotNull
@@ -67,7 +67,7 @@ public class AddOverrideToEqualsHashCodeToStringFix extends JetIntentionAction<P
List<JetParameter> parameters = function.getValueParameters();
if (parameters.size() != 1) return false;
JetTypeReference parameterType = parameters.iterator().next().getTypeReference();
return parameterType != null && ("Any?".equals(parameterType.getText()) || "jet.Any?".equals(parameterType.getText()));
return parameterType != null && "Any?".equals(parameterType.getText());
}
if ("hashCode".equals(name) || "toString".equals(name)) {
@@ -99,7 +99,7 @@ public class AddOverrideToEqualsHashCodeToStringFix extends JetIntentionAction<P
return new JetSingleIntentionActionFactory() {
@Nullable
@Override
public AddOverrideToEqualsHashCodeToStringFix createAction(Diagnostic diagnostic) {
public AddOverrideToEqualsHashCodeToStringFix createAction(@NotNull Diagnostic diagnostic) {
return new AddOverrideToEqualsHashCodeToStringFix(diagnostic.getPsiElement());
}
};