New J2K: do not ignore errors in new j2k tests comparison
This commit is contained in:
@@ -1,6 +1,3 @@
|
|||||||
// !forceNotNullTypes: false
|
|
||||||
// !specifyLocalVariableTypeByDefault: true
|
|
||||||
|
|
||||||
import java.util.HashSet
|
import java.util.HashSet
|
||||||
|
|
||||||
internal class Foo {
|
internal class Foo {
|
||||||
|
|||||||
Vendored
-2
@@ -1,5 +1,3 @@
|
|||||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K : Any!, V : Any!>(initialCapacity: Int) Please specify it explicitly.
|
|
||||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K : Any!, V : Any!>(initialCapacity: Int) Please specify it explicitly.
|
|
||||||
package demo
|
package demo
|
||||||
|
|
||||||
import java.util.HashMap
|
import java.util.HashMap
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// ERROR: Property must be initialized or be abstract
|
|
||||||
class Identifier {
|
class Identifier {
|
||||||
val name: String
|
val name: String
|
||||||
private var myHasDollar = false
|
private var myHasDollar = false
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// ERROR: Unresolved reference: clone
|
|
||||||
internal open class Base
|
internal open class Base
|
||||||
|
|
||||||
internal class X : Base(), Cloneable {
|
internal class X : Base(), Cloneable {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// ERROR: Type mismatch: inferred type is String but Charset was expected
|
// ERROR: Type mismatch: inferred type is String but Charset was expected
|
||||||
// ERROR: Type mismatch: inferred type is String but Charset was expected
|
// ERROR: Type mismatch: inferred type is String but Charset was expected
|
||||||
// ERROR: Type mismatch: inferred type is kotlin.Comparator<String> /* = java.util.Comparator<String> */ but java.util.Comparator<String?> was expected
|
|
||||||
import java.nio.charset.Charset
|
import java.nio.charset.Charset
|
||||||
import java.util.Comparator
|
import java.util.Comparator
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// ERROR: One type argument expected for interface List<out E>
|
|
||||||
package test
|
package test
|
||||||
|
|
||||||
internal class User {
|
internal class User {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// ERROR: Return type of 'get' is not a subtype of the return type of the overridden member 'public abstract fun get(): String defined in Getter'
|
|
||||||
internal interface Getter {
|
internal interface Getter {
|
||||||
fun get(): String?
|
fun get(): String?
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// ERROR: Type mismatch: inferred type is Passenger.PassChild? but Passenger.PassChild was expected
|
|
||||||
// ERROR: Type mismatch: inferred type is Passenger.PassChild? but Passenger.PassChild was expected
|
|
||||||
class Passenger {
|
class Passenger {
|
||||||
open class PassParent
|
open class PassParent
|
||||||
|
|
||||||
|
|||||||
+3
@@ -1,3 +1,6 @@
|
|||||||
|
// ERROR: Type mismatch: inferred type is Any but String was expected
|
||||||
|
// ERROR: Type mismatch: inferred type is Any but String was expected
|
||||||
|
// ERROR: Type mismatch: inferred type is Array<String> but Array<Any> was expected
|
||||||
import java.util.Arrays
|
import java.util.Arrays
|
||||||
|
|
||||||
class Foo {
|
class Foo {
|
||||||
|
|||||||
@@ -5,13 +5,11 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.nj2k
|
package org.jetbrains.kotlin.nj2k
|
||||||
|
|
||||||
import com.intellij.psi.PsiComment
|
|
||||||
import com.intellij.psi.PsiElement
|
import com.intellij.psi.PsiElement
|
||||||
import com.intellij.psi.PsiElementVisitor
|
import com.intellij.psi.PsiElementVisitor
|
||||||
import com.intellij.psi.PsiWhiteSpace
|
import com.intellij.psi.PsiWhiteSpace
|
||||||
import com.intellij.psi.impl.source.tree.LeafPsiElement
|
import com.intellij.psi.impl.source.tree.LeafPsiElement
|
||||||
import org.jetbrains.kotlin.psi.KtFile
|
import org.jetbrains.kotlin.psi.KtFile
|
||||||
import org.jetbrains.kotlin.psi.KtImportDirective
|
|
||||||
|
|
||||||
internal fun KtFile.dumpStructureText(): String {
|
internal fun KtFile.dumpStructureText(): String {
|
||||||
val sb = StringBuilder()
|
val sb = StringBuilder()
|
||||||
@@ -23,9 +21,6 @@ internal fun KtFile.dumpStructureText(): String {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (element is PsiComment && (element.text.startsWith("// ERROR") || element.text.startsWith("// !"))) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (element is LeafPsiElement) {
|
if (element is LeafPsiElement) {
|
||||||
sb.append(element.text)
|
sb.append(element.text)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user