Exposed visibility deprecation warnings made errors + relevant test fixes

This commit is contained in:
Mikhail Glukhikh
2015-11-17 18:59:04 +03:00
parent e8e5d700d2
commit 4e44466cf9
63 changed files with 93 additions and 87 deletions
@@ -3,4 +3,4 @@
// ACTION: Convert to block body
// ERROR: Unresolved reference: Foo
fun test(): A = <caret>Foo(2, "2")
internal fun test(): A = <caret>Foo(2, "2")
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
class A<T>(val b: B<T>) {
fun test() = B.Foo<Int, String>(2, "2")
class A<T> internal constructor(val b: B<T>) {
internal fun test() = B.Foo<Int, String>(2, "2")
}
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
class A<T>(val b: B<T>) {
fun test() = B.<caret>Foo<Int, String>(2, "2")
class A<T> internal constructor(val b: B<T>) {
internal fun test() = B.<caret>Foo<Int, String>(2, "2")
}
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
class A<T>(val b: B<T>) {
fun test() = b.Foo<Int, String>(2, "2")
class A<T> internal constructor(val b: B<T>) {
internal fun test() = b.Foo<Int, String>(2, "2")
}
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
class A<T>(val b: B<T>) {
fun test() = b.<caret>Foo<Int, String>(2, "2")
class A<T> internal constructor(val b: B<T>) {
internal fun test() = b.<caret>Foo<Int, String>(2, "2")
}
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
class A<T>(val b: B<T>) {
fun test() = b.Foo<String>(2, "2")
class A<T> internal constructor(val b: B<T>) {
internal fun test() = b.Foo<String>(2, "2")
}
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
class A<T>(val b: B<T>) {
fun test() = b.<caret>Foo<String>(2, "2")
class A<T> internal constructor(val b: B<T>) {
internal fun test() = b.<caret>Foo<String>(2, "2")
}
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
class A<T>(val b: B<T>) {
fun test() = b.Foo<T, Int, String>(2, "2")
class A<T> internal constructor(val b: B<T>) {
internal fun test() = b.Foo<T, Int, String>(2, "2")
}
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
class A<T>(val b: B<T>) {
fun test() = b.<caret>Foo<T, Int, String>(2, "2")
class A<T> internal constructor(val b: B<T>) {
internal fun test() = b.<caret>Foo<T, Int, String>(2, "2")
}
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
class A<T>(val b: B<T>) {
fun test() = B.Foo<String>(2, "2")
class A<T> internal constructor(val b: B<T>) {
internal fun test() = B.Foo<String>(2, "2")
}
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
class A<T>(val b: B<T>) {
fun test() = B.<caret>Foo<String>(2, "2")
class A<T> internal constructor(val b: B<T>) {
internal fun test() = B.<caret>Foo<String>(2, "2")
}
@@ -2,4 +2,4 @@
// ACTION: Convert to block body
// ACTION: Create member property 'A'
// ERROR: Unresolved reference: A
fun foo(): J = J.<caret>A
internal fun foo(): J = J.<caret>A
@@ -2,4 +2,4 @@
// ACTION: Convert to block body
// ACTION: Create member property 'A'
// ERROR: Unresolved reference: A
fun foo(): X = E.<caret>A
internal fun foo(): X = E.<caret>A
@@ -1,6 +1,6 @@
// "Create member function 'foo'" "true"
// ERROR: Unresolved reference: foo
fun test(a: A): Int? {
internal fun test(a: A): Int? {
return a.foo<String, Int>(1, "2")
}
@@ -1,6 +1,6 @@
// "Create member function 'foo'" "true"
// ERROR: Unresolved reference: foo
fun test(a: A): Int? {
internal fun test(a: A): Int? {
return a.<caret>foo<String, Int>(1, "2")
}
@@ -1,7 +1,7 @@
// "Create member function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
class A<T> internal constructor(val b: B<T>) {
fun test(): Int {
return b.foo<Int, String>(2, "2")
}
@@ -1,7 +1,7 @@
// "Create member function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
class A<T> internal constructor(val b: B<T>) {
fun test(): Int {
return b.<caret>foo<Int, String>(2, "2")
}
@@ -1,7 +1,7 @@
// "Create member function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
class A<T> internal constructor(val b: B<T>) {
fun test(): Int {
return b.foo<Int>(2, "2")
}
@@ -1,7 +1,7 @@
// "Create member function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
class A<T> internal constructor(val b: B<T>) {
fun test(): Int {
return b.<caret>foo<Int>(2, "2")
}
@@ -1,7 +1,7 @@
// "Create member function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
class A<T> internal constructor(val b: B<T>) {
fun test(): Int {
return b.foo<Int, String>(2, "2")
}
@@ -1,7 +1,7 @@
// "Create member function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
class A<T> internal constructor(val b: B<T>) {
fun test(): Int {
return b.<caret>foo<T, Int, String>(2, "2")
}
@@ -1,6 +1,6 @@
// "Create secondary constructor" "true"
// ERROR: Too many arguments for public/*package*/ constructor J() defined in J
class B: J(1) {
internal class B: J(1) {
}
@@ -1,6 +1,6 @@
// "Create secondary constructor" "true"
// ERROR: Too many arguments for public/*package*/ constructor J() defined in J
class B: J(<caret>1) {
internal class B: J(<caret>1) {
}
@@ -1,4 +1,4 @@
// "Create secondary constructor" "true"
// ERROR: Too many arguments for public/*package*/ constructor J() defined in J
fun test() = J(1)
internal fun test() = J(1)
@@ -1,4 +1,4 @@
// "Create secondary constructor" "true"
// ERROR: Too many arguments for public/*package*/ constructor J() defined in J
fun test() = J(<caret>1)
internal fun test() = J(<caret>1)
@@ -1,7 +1,7 @@
// "Create secondary constructor" "true"
// ERROR: Too many arguments for public/*package*/ constructor J() defined in J
class B: J {
internal class B: J {
constructor(): super(1) {
}
@@ -1,7 +1,7 @@
// "Create secondary constructor" "true"
// ERROR: Too many arguments for public/*package*/ constructor J() defined in J
class B: J {
internal class B: J {
constructor(): super(<caret>1) {
}
@@ -1,4 +1,4 @@
// "Create parameter 's'" "true"
// ERROR: Unresolved reference: s
fun foo(s: String?) = C(s)
internal fun foo(s: String?) = C(s)
@@ -1,4 +1,4 @@
// "Create parameter 's'" "true"
// ERROR: Unresolved reference: s
fun foo() = C(<caret>s)
internal fun foo() = C(<caret>s)
@@ -3,6 +3,6 @@
// ACTION: Create extension property 'foo'
// ERROR: Unresolved reference: foo
fun test(a: A): String? {
internal fun test(a: A): String? {
return a.<caret>foo
}