Type alias constructors for inner classes in expressions ans supertype lists.
This commit is contained in:
@@ -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
|
||||
+12
@@ -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
|
||||
Reference in New Issue
Block a user