Create from usage: make new member function/property private by default
#KT-6689 Fixed
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ class A {
|
||||
return foo(2, "2")
|
||||
}
|
||||
|
||||
fun foo(i: Int, s: String): Int {
|
||||
private fun foo(i: Int, s: String): Int {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import kotlin.properties.ReadOnlyProperty
|
||||
class A<T>(val t: T) {
|
||||
val x: A<Int> by foo(t, "")
|
||||
|
||||
fun foo(t: T, s: String): ReadOnlyProperty<A<T>, A<Int>> {
|
||||
private fun foo(t: T, s: String): ReadOnlyProperty<A<T>, A<Int>> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import kotlin.properties.ReadWriteProperty
|
||||
class A<T>(val t: T) {
|
||||
var x: A<Int> by foo(t, "")
|
||||
|
||||
fun foo(t: T, s: String): ReadWriteProperty<A<T>, A<Int>> {
|
||||
private fun foo(t: T, s: String): ReadWriteProperty<A<T>, A<Int>> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ class A {
|
||||
return foo(2, "2")
|
||||
}
|
||||
|
||||
fun foo(i: Int, s: String): Int {
|
||||
private fun foo(i: Int, s: String): Int {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Create function 'foo'" "true"
|
||||
class A {
|
||||
fun test() {
|
||||
foo()
|
||||
}
|
||||
|
||||
private fun foo() {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ class A<T>(val n: T) {
|
||||
return this.foo(2, "2")
|
||||
}
|
||||
|
||||
fun foo(i: Int, s: String): A<Int> {
|
||||
private fun foo(i: Int, s: String): A<Int> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -6,7 +6,7 @@ class A<T>(val n: T) {
|
||||
return this.foo(2, "2")
|
||||
}
|
||||
|
||||
fun foo(i: Int, s: String): A<Int> {
|
||||
private fun foo(i: Int, s: String): A<Int> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ class A<T>(val n: T) {
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(i: Int, s: String): A<Int> {
|
||||
private fun foo(i: Int, s: String): A<Int> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Create function 'foo'" "true"
|
||||
class A {
|
||||
fun test() {
|
||||
<caret>foo()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user