Create from Usage: Make extension functions/properties 'private' by default

#KT-11799 Fixed
This commit is contained in:
Alexey Sedunov
2016-08-17 14:19:04 +03:00
parent 92b0c852dd
commit 99ba340236
35 changed files with 37 additions and 35 deletions
@@ -3,7 +3,7 @@
import package1.A
val package2.A.foo: Any
private val package2.A.foo: Any<caret>
class X {
init {
@@ -1,7 +1,7 @@
// "Create extension property 'A.foo'" "true"
// ERROR: Unresolved reference: foo
val A.foo: String?
private val A.foo: String?<caret>
fun test(): String? {
return A().foo
@@ -1,7 +1,7 @@
// "Create extension property 'A.foo'" "true"
// ERROR: Unresolved reference: foo
val A.foo: String?
private val A.foo: String?<caret>
fun test(): String? {
return A().foo
@@ -2,7 +2,7 @@
// ERROR: Property must be initialized
fun consume(n: Int) {}
val <T> T.bar: Int
private val <T> T.bar: Int
fun <T> foo(t: T) {
consume(t.bar)
@@ -2,7 +2,7 @@
// ERROR: Property must be initialized
// WITH_RUNTIME
val Unit.foo: Int
private val Unit.foo: Int
fun test() {
val a: Int = Unit.foo
@@ -4,7 +4,7 @@
class A<T>(val n: T)
val Int.foo: A<Int>
private val Int.foo: A<Int>
fun test() {
val a: A<Int> = 2.foo
@@ -4,7 +4,7 @@
class A<T>(val n: T)
var Int.foo: A<String>
private var Int.foo: A<String>
fun test() {
2.foo = A("2")