Type parameters for type alias constructor are declared type parameters for type alias

(no implicit type parameters from containing scopes).
This commit is contained in:
Dmitry Petrov
2016-06-09 19:35:02 +03:00
parent bcd1df4efe
commit c04b16d6cc
4 changed files with 29 additions and 1 deletions
@@ -0,0 +1,11 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
class Cell<TC>(val x: TC)
fun <T> id(x: T): T {
typealias C = Cell<T>
class Local(val cell: C)
val cx = C(x)
val c: C = Local(cx).cell
return c.x
}
@@ -0,0 +1,11 @@
package
public fun </*0*/ T> id(/*0*/ x: T): T
public final class Cell</*0*/ TC> {
public constructor Cell</*0*/ TC>(/*0*/ x: TC)
public final val x: TC
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
}