Introduce Type Alias: Support callable references/class literals

#KT-14861 Fixed
This commit is contained in:
Alexey Sedunov
2016-11-21 16:34:41 +03:00
parent 9967d4c4e2
commit 752ae87591
13 changed files with 155 additions and 34 deletions
@@ -0,0 +1,9 @@
// NAME: T
class A {
fun bar() = 1
}
// SIBLING:
fun foo() {
val a = <caret>A::bar
}
@@ -0,0 +1,11 @@
// NAME: T
class A {
fun bar() = 1
}
typealias T = A
// SIBLING:
fun foo() {
val a = T::bar
}
@@ -0,0 +1,9 @@
// NAME: T
class A {
fun bar() = 1
}
// SIBLING:
fun foo() {
val a = A::<caret>bar
}
@@ -0,0 +1 @@
Refactoring can't be performed on the selected code element
@@ -0,0 +1,9 @@
// NAME: T
class A {
fun bar() = 1
}
// SIBLING:
fun foo() {
val a = <caret>A::class
}
@@ -0,0 +1,11 @@
// NAME: T
class A {
fun bar() = 1
}
typealias T = A
// SIBLING:
fun foo() {
val a = T::class
}