Type alias constructors for inner classes in expressions ans supertype lists.

This commit is contained in:
Dmitry Petrov
2016-11-18 11:45:55 +03:00
parent 9ac3dbceca
commit d665193c20
18 changed files with 379 additions and 40 deletions
@@ -0,0 +1,10 @@
class Outer(val x: String) {
inner class Inner(val y: String) {
val z = x + y
}
}
typealias OI = Outer.Inner
fun box(): String =
Outer("O").OI("K").z
@@ -0,0 +1,12 @@
class Outer(val x: String) {
abstract inner class InnerBase
inner class Inner(val y: String) : OIB() {
val z = x + y
}
}
typealias OIB = Outer.InnerBase
fun box(): String =
Outer("O").Inner("K").z