Introduce Property: Add tests for default values

This commit is contained in:
Alexey Sedunov
2015-03-05 15:40:04 +03:00
parent 1202e624ce
commit cab301e8e2
5 changed files with 36 additions and 0 deletions
@@ -0,0 +1,4 @@
// EXTRACTION_TARGET: property with initializer
class A(val a: Int = <selection>1 + 2</selection>) {
}
@@ -0,0 +1,6 @@
private val i = 1 + 2
// EXTRACTION_TARGET: property with initializer
class A(val a: Int = i) {
}
@@ -0,0 +1,6 @@
// EXTRACTION_TARGET: property with initializer
class A {
fun foo(a: Int = <selection>1 + 2</selection>) {
}
}
@@ -0,0 +1,8 @@
// EXTRACTION_TARGET: property with initializer
class A {
private val i = 1 + 2
fun foo(a: Int = i) {
}
}