Fix language features in tests for gradual migration to 1.3 (part 2)

In 1.3, due to changes in language, testdata for some tests can be
different from 1.2

We want to simlultaneously test both versions, so instead of fixing
language version in such tests, we split them into two: one with fixed
1.2, another with fixed 1.3
This commit is contained in:
Dmitry Savvinov
2018-06-22 11:23:52 +03:00
parent 6d733ff7b9
commit 5cb949ad7f
71 changed files with 1637 additions and 99 deletions
@@ -0,0 +1,22 @@
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
open class Outer<E> {
inner class Inner<F>
}
class Derived : Outer<String>() {
// Inner<Int> here means Outer<String>.Inner<Int>
fun foo(x: Inner<Int>) {}
}
class A {
companion object : Outer<String>()
// Does not work, could be Outer<String>.Inner<Int>
// TODO: Should work?
fun foo(x: <!UNRESOLVED_REFERENCE!>Inner<!><Int>) {
// Inner<Char>() call use companion as implicit receiver
val y: Outer<String>.Inner<Char> = Inner<Char>()
}
}
@@ -0,0 +1,38 @@
package
public final class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public final fun foo(/*0*/ x: [ERROR : Inner<Int>]<kotlin.Int>): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public companion object Companion : Outer<kotlin.String> {
private constructor Companion()
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 final class Derived : Outer<kotlin.String> {
public constructor Derived()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public final fun foo(/*0*/ x: Outer<kotlin.String>.Inner<kotlin.Int>): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public open class Outer</*0*/ E> {
public constructor Outer</*0*/ E>()
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 final inner class Inner</*0*/ F> /*captured type parameters: /*1*/ E*/ {
public constructor Inner</*0*/ F>()
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
}
}
@@ -1,3 +1,4 @@
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
open class Outer<E> {
inner class Inner<F>