Extract Function: Choose default visibility at analysis phase

This commit is contained in:
Alexey Sedunov
2014-07-28 16:24:05 +04:00
parent 8af173bd4b
commit cb3328c052
131 changed files with 139 additions and 135 deletions
@@ -13,7 +13,7 @@ class MyClass {
}
}
fun i(): Int {
private fun i(): Int {
MyClass.coFun()
return MyClass.coProp + 10
}
@@ -15,7 +15,7 @@ class A {
}
}
fun i(): Int {
private fun i(): Int {
A.B.coFun()
return A.B.coProp + 10
}
@@ -10,7 +10,7 @@ fun main(args: Array<String>) {
else false
}
fun b(): Boolean {
private fun b(): Boolean {
val al = 0
return al.bar(1)
}
@@ -6,7 +6,7 @@ fun main(args: Array<String>) {
unit(a)
}
fun unit(a: Int) {
private fun unit(a: Int) {
a
}
@@ -9,6 +9,6 @@ fun foo(a: Int, b: Int, c: Int): Int {
return i(a, b, c)
}
fun i(a: Int, b: Int, c: Int): Int {
private fun i(a: Int, b: Int, c: Int): Int {
return (a + b * a - c) + b * c
}
@@ -7,7 +7,7 @@ class MyClass {
public annotation class P
}
fun unit() {
private fun unit() {
[MyClass.P] val t: Int = 1
t
}
@@ -12,7 +12,7 @@ class MyClass {
}
}
fun unit() {
private fun unit() {
MyClass.P.foo()
MyClass.P.a
}
@@ -12,7 +12,7 @@ class MyClass {
}
}
fun unit() {
private fun unit() {
MyClass.P.A.foo()
MyClass.P.A.a
}
@@ -10,7 +10,7 @@ class MyClass {
}
}
fun unit() {
private fun unit() {
MyClass.P.foo()
MyClass.P.a
}
@@ -10,7 +10,7 @@ class MyClass {
}
}
fun unit() {
private fun unit() {
foo()
a
}
@@ -11,6 +11,6 @@ class MyClass {
}
}
fun unit() {
private fun unit() {
val t: MyClass.P<MyClass.P.Q>? = null
}
@@ -15,7 +15,7 @@ class MyClass {
}
}
fun unit() {
private fun unit() {
val a: Any = MyClass.P.Q()
val t = MyClass.P.R<MyClass.P.Q>(a as MyClass.P.Q)
}
@@ -11,7 +11,7 @@ class MyClass {
}
}
fun unit() {
private fun unit() {
val t: MyClass.P.Q = MyClass.P.Q()
t
}
@@ -6,7 +6,7 @@ fun foo(a: Int, b: Int): Int {
return 0
}
fun b(a: Int): Boolean {
private fun b(a: Int): Boolean {
if (a > 0) return true
return false
}
@@ -7,7 +7,7 @@ class MyClass {
public class P
}
fun unit() {
private fun unit() {
val t: MyClass.P = MyClass.P()
t
}
@@ -13,7 +13,7 @@ public class A() {
}
}
fun i(a: A, t: Int, u: Int, x: Int): Int {
private fun i(a: A, t: Int, u: Int, x: Int): Int {
return a.bar(t - x, u + x)
}
@@ -9,6 +9,6 @@ fun testProp() {
unit(foo)
}
fun unit(foo: A) {
private fun unit(foo: A) {
foo()
}