Add tests for obsolete issues
#KT-4628 Obsolete #KT-3897 Obsolete #KT-3898 Obsolete #KT-7523 Obsolete
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// FILE: Hello.kt
|
||||
private class Hello()
|
||||
{
|
||||
val a = 4
|
||||
}
|
||||
|
||||
fun test() {
|
||||
// no exception is thrown (see KT-3897)
|
||||
Hello().a
|
||||
}
|
||||
|
||||
// FILE: Hello.java
|
||||
public class Hello {}
|
||||
@@ -0,0 +1,18 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
private final class Hello {
|
||||
public constructor Hello()
|
||||
public final val a: kotlin.Int = 4
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class Hello {
|
||||
public constructor Hello()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// FILE: A.java
|
||||
|
||||
public class A {
|
||||
public String foo;
|
||||
public String foo = "";
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun foo() {
|
||||
// no exception is thrown (see KT-3898)
|
||||
A().foo
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
public fun foo(): kotlin.Unit
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public final var foo: kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// FILE: A.java
|
||||
public class A {
|
||||
public B b() {}
|
||||
public F f() {}
|
||||
}
|
||||
|
||||
class B { public void bar() {} }
|
||||
|
||||
// FILE: C.java
|
||||
class D {
|
||||
public void baz() {}
|
||||
}
|
||||
|
||||
// FILE: E.java
|
||||
class F {
|
||||
public void foobaz() {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun main(x: A) {
|
||||
x.b().bar()
|
||||
x.f().<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>foobaz<!>()
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>D<!>().<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>baz<!>()
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
public fun main(/*0*/ x: A): kotlin.Unit
|
||||
|
||||
public open class A {
|
||||
public constructor A()
|
||||
public open fun b(): B!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun f(): [ERROR : Unresolved java classifier: F]!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// FILE: A.java
|
||||
public interface A<T extends A<? super T, ?>, S extends A<? super T, ?>> {}
|
||||
|
||||
// FILE: C.java
|
||||
public class C
|
||||
{
|
||||
public <T extends A<? super T, ?>, S extends A<? super T, ?>> void f(A<T, S> x){}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun foo() {
|
||||
// TODO: uncomment when KT-9597 is fixed
|
||||
// C().f(object : A<*, *> {})
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
public fun foo(): kotlin.Unit
|
||||
|
||||
public interface A</*0*/ T : A<in T!, *>!, /*1*/ S : A<in T!, *>!> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class C {
|
||||
public constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun </*0*/ T : A<in T!, *>!, /*1*/ S : A<in T!, *>!> f(/*0*/ x: A<T!, S!>!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -9987,6 +9987,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("differentFilename.kt")
|
||||
public void testDifferentFilename() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/differentFilename.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("enumGetOrdinal.kt")
|
||||
public void testEnumGetOrdinal() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/enumGetOrdinal.kt");
|
||||
@@ -10149,6 +10155,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt7523.kt")
|
||||
public void testKt7523() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt7523.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("mutableIterator.kt")
|
||||
public void testMutableIterator() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/mutableIterator.kt");
|
||||
@@ -10293,6 +10305,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class BrokenCode extends AbstractDiagnosticsTest {
|
||||
public void testAllFilesPresentInBrokenCode() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/brokenCode"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("classDuplicates.kt")
|
||||
public void testClassDuplicates() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode/classDuplicates.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("fieldDuplicates.kt")
|
||||
public void testFieldDuplicates() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode/fieldDuplicates.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user