FIR: rename HIDDEN to INVISIBLE_REFERENCE
Some of them should be INVISIBLE_MEMBER though
This commit is contained in:
@@ -5,6 +5,6 @@ fun test() {
|
||||
Int(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
Short(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
Byte(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
<!HIDDEN!>Char<!>()
|
||||
<!INVISIBLE_REFERENCE!>Char<!>()
|
||||
Boolean(<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ fun main() {
|
||||
java.lang.System = null
|
||||
java.lang.System!!
|
||||
System is Int
|
||||
<!HIDDEN!>System<!>()
|
||||
<!INVISIBLE_REFERENCE!>System<!>()
|
||||
(System)
|
||||
foo@ System
|
||||
null <!UNRESOLVED_REFERENCE!>in<!> System
|
||||
|
||||
@@ -10,8 +10,8 @@ package outer.p1
|
||||
import outer.a
|
||||
|
||||
fun use() {
|
||||
<!HIDDEN!>a<!>()
|
||||
outer.<!HIDDEN!>B<!>()
|
||||
<!INVISIBLE_REFERENCE!>a<!>()
|
||||
outer.<!INVISIBLE_REFERENCE!>B<!>()
|
||||
}
|
||||
|
||||
// FILE: c.kt
|
||||
@@ -20,6 +20,6 @@ package outer.p1.p2
|
||||
import outer.a
|
||||
|
||||
fun use() {
|
||||
<!HIDDEN!>a<!>()
|
||||
outer.<!HIDDEN!>B<!>()
|
||||
<!INVISIBLE_REFERENCE!>a<!>()
|
||||
outer.<!INVISIBLE_REFERENCE!>B<!>()
|
||||
}
|
||||
|
||||
+11
-11
@@ -3,36 +3,36 @@ package test
|
||||
|
||||
import kotlin.internal.RequireKotlin
|
||||
|
||||
<!HIDDEN!>@RequireKotlin("")<!>
|
||||
@RequireKotlin("")
|
||||
fun f01() {}
|
||||
|
||||
<!HIDDEN!>@RequireKotlin("x")<!>
|
||||
@RequireKotlin("x")
|
||||
fun f02() {}
|
||||
|
||||
<!HIDDEN!>@RequireKotlin("1")<!>
|
||||
@RequireKotlin("1")
|
||||
fun f03() {}
|
||||
|
||||
<!HIDDEN!>@RequireKotlin("1.0-beta")<!>
|
||||
@RequireKotlin("1.0-beta")
|
||||
fun f04() {}
|
||||
|
||||
<!HIDDEN!>@RequireKotlin("1.1.0-dev-1111")<!>
|
||||
@RequireKotlin("1.1.0-dev-1111")
|
||||
fun f05() {}
|
||||
|
||||
<!HIDDEN!>@RequireKotlin("1.5.3.7")<!>
|
||||
@RequireKotlin("1.5.3.7")
|
||||
fun f06() {}
|
||||
|
||||
<!HIDDEN!>@RequireKotlin("1..0")<!>
|
||||
@RequireKotlin("1..0")
|
||||
fun f07() {}
|
||||
|
||||
<!HIDDEN!>@RequireKotlin(" 1.0")<!>
|
||||
@RequireKotlin(" 1.0")
|
||||
fun f08() {}
|
||||
|
||||
|
||||
<!HIDDEN!>@RequireKotlin("1.1")<!>
|
||||
@RequireKotlin("1.1")
|
||||
fun ok1() {}
|
||||
|
||||
<!HIDDEN!>@RequireKotlin("1.1.0")<!>
|
||||
@RequireKotlin("1.1.0")
|
||||
fun ok2() {}
|
||||
|
||||
<!HIDDEN!>@RequireKotlin("0.0.0")<!>
|
||||
@RequireKotlin("0.0.0")
|
||||
fun ok3() {}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package foo
|
||||
|
||||
fun test() {
|
||||
A.d
|
||||
A.Companion.<!HIDDEN!>f<!>
|
||||
A.Companion.<!INVISIBLE_REFERENCE!>f<!>
|
||||
B.D
|
||||
CCC
|
||||
CCC.classObjectVar
|
||||
|
||||
+4
-4
@@ -35,14 +35,14 @@ import a.D
|
||||
|
||||
fun test() {
|
||||
f(A)
|
||||
f(<!HIDDEN!>B<!>)
|
||||
f(<!INVISIBLE_REFERENCE!>B<!>)
|
||||
f(C)
|
||||
f(<!HIDDEN!>D<!>)
|
||||
f(<!INVISIBLE_REFERENCE!>D<!>)
|
||||
|
||||
A.foo()
|
||||
<!HIDDEN!>B<!>.bar()
|
||||
<!INVISIBLE_REFERENCE!>B<!>.bar()
|
||||
C.baz()
|
||||
<!HIDDEN!>D<!>.quux()
|
||||
<!INVISIBLE_REFERENCE!>D<!>.quux()
|
||||
|
||||
a.A.foo()
|
||||
a.C.baz()
|
||||
|
||||
+3
-3
@@ -21,15 +21,15 @@ import p.*
|
||||
|
||||
class K: J.C() {
|
||||
fun dynamic.test() {
|
||||
<!HIDDEN!>sam<!>(null)
|
||||
<!HIDDEN!>sam<!>(
|
||||
<!INVISIBLE_REFERENCE!>sam<!>(null)
|
||||
<!INVISIBLE_REFERENCE!>sam<!>(
|
||||
name = null,
|
||||
name = null
|
||||
)
|
||||
}
|
||||
|
||||
fun test() {
|
||||
<!HIDDEN!>sam<!>(null)
|
||||
<!INVISIBLE_REFERENCE!>sam<!>(null)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,5 +6,5 @@ enum class A(val c: Int) {
|
||||
|
||||
fun createA(): A {
|
||||
// Error should be here!
|
||||
return <!HIDDEN!>A<!>(10)
|
||||
return <!INVISIBLE_REFERENCE!>A<!>(10)
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@ open enum class MyEnum() {
|
||||
|
||||
enum class MyEnum2() {}
|
||||
|
||||
class MyClass(): <!HIDDEN!>MyEnum2<!>() {}
|
||||
class MyClass(): <!INVISIBLE_REFERENCE!>MyEnum2<!>() {}
|
||||
|
||||
class MyClass2(): <!UNRESOLVED_REFERENCE!>MyJavaEnum<!>() {}
|
||||
|
||||
+1
-1
@@ -7,6 +7,6 @@ fun bar(arg: String) = arg
|
||||
class Derived : Base("123") {
|
||||
|
||||
private inline fun foo() {
|
||||
bar(<!HIDDEN!>v<!>)
|
||||
bar(<!INVISIBLE_REFERENCE!>v<!>)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,24 +22,24 @@ import j.JavaProtected
|
||||
import j.JavaPackageLocal
|
||||
|
||||
class A {
|
||||
val p1 = JavaPackageLocal.<!HIDDEN!>javaPPackage<!>
|
||||
val p2 = JavaProtected.<!HIDDEN!>javaPProtectedStatic<!>
|
||||
val p3 = JavaProtected().<!HIDDEN!>javaPProtectedPackage<!>
|
||||
val p1 = JavaPackageLocal.<!INVISIBLE_REFERENCE!>javaPPackage<!>
|
||||
val p2 = JavaProtected.<!INVISIBLE_REFERENCE!>javaPProtectedStatic<!>
|
||||
val p3 = JavaProtected().<!INVISIBLE_REFERENCE!>javaPProtectedPackage<!>
|
||||
|
||||
fun test() {
|
||||
JavaProtected.<!HIDDEN!>javaMProtectedStatic<!>()
|
||||
JavaPackageLocal.<!HIDDEN!>javaMPackage<!>()
|
||||
JavaProtected.<!INVISIBLE_REFERENCE!>javaMProtectedStatic<!>()
|
||||
JavaPackageLocal.<!INVISIBLE_REFERENCE!>javaMPackage<!>()
|
||||
}
|
||||
}
|
||||
|
||||
class B : JavaProtected() {
|
||||
val p1 = JavaPackageLocal.<!HIDDEN!>javaPPackage<!>
|
||||
val p1 = JavaPackageLocal.<!INVISIBLE_REFERENCE!>javaPPackage<!>
|
||||
val p2 = JavaProtected.javaPProtectedStatic
|
||||
val p3 = javaPProtectedPackage
|
||||
|
||||
fun test() {
|
||||
JavaProtected.javaMProtectedStatic()
|
||||
JavaPackageLocal.<!HIDDEN!>javaMPackage<!>()
|
||||
JavaPackageLocal.<!INVISIBLE_REFERENCE!>javaMPackage<!>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ private object TopLevelObject {
|
||||
}
|
||||
|
||||
fun testAccess() {
|
||||
<!HIDDEN!>NestedClass<!>()
|
||||
<!INVISIBLE_REFERENCE!>NestedClass<!>()
|
||||
E1
|
||||
InNested()
|
||||
NestedEntry
|
||||
|
||||
+1
-1
@@ -15,4 +15,4 @@ package p1
|
||||
import p2.*
|
||||
|
||||
val <!EXPOSED_PROPERTY_TYPE!>x<!>: X = <!INITIALIZER_TYPE_MISMATCH!>X()<!>
|
||||
val <!EXPOSED_PROPERTY_TYPE!>y<!>: Y = <!HIDDEN!>Y<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>y<!>: Y = <!INVISIBLE_REFERENCE!>Y<!>()
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ package a
|
||||
|
||||
import pack1.*
|
||||
|
||||
private class X : <!HIDDEN!>SomeClass<!>()
|
||||
private class X : <!INVISIBLE_REFERENCE!>SomeClass<!>()
|
||||
|
||||
+1
-1
@@ -11,4 +11,4 @@ package a
|
||||
|
||||
import pack1.SomeClass.*
|
||||
|
||||
private class X : <!EXPOSED_SUPER_CLASS, HIDDEN!>N<!>()
|
||||
private class X : <!EXPOSED_SUPER_CLASS, INVISIBLE_REFERENCE!>N<!>()
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
import B.foo
|
||||
|
||||
fun test() {
|
||||
<!HIDDEN!>foo<!>
|
||||
<!INVISIBLE_REFERENCE!>foo<!>
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
|
||||
@@ -14,7 +14,7 @@ fun x(f : Foo) {
|
||||
|
||||
f.<!UNRESOLVED_REFERENCE!>a<!>()
|
||||
<!UNRESOLVED_REFERENCE!>c<!>()
|
||||
<!HIDDEN!>R<!>()
|
||||
<!INVISIBLE_REFERENCE!>R<!>()
|
||||
}
|
||||
|
||||
object R {}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import kotlin.internal.Exact
|
||||
|
||||
class Inv<I>(val arg: I)
|
||||
class InvExact<E>(val arg: <!HIDDEN, HIDDEN!>@kotlin.internal.Exact<!> E)
|
||||
class InvExact<E>(val arg: @kotlin.internal.Exact E)
|
||||
|
||||
interface Base
|
||||
class Derived : Base
|
||||
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
// WITH_RUNTIME
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
|
||||
import kotlin.internal.OnlyInputTypes
|
||||
|
||||
fun <<!HIDDEN!>@OnlyInputTypes<!> T> assertEquals(expected: T, actual: T, message: String? = null) {}
|
||||
|
||||
fun main() {
|
||||
assertEquals(
|
||||
mapOf(1 to "1", 2 to "2", 3 to "3"),
|
||||
intArrayOf(1, 2, 3).associateWith { it.toString() }
|
||||
)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_RUNTIME
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
|
||||
<!HIDDEN!>@kotlin.internal.InlineOnly<!>
|
||||
<!INVISIBLE_REFERENCE!>@kotlin.internal.InlineOnly<!>
|
||||
public inline fun <C, R> C.ifEmpty(f: () -> R): R where C : Collection<*>, C : R = if (isEmpty()) f() else this
|
||||
|
||||
public fun <T> listOf(t: T): List<T> = TODO()
|
||||
|
||||
@@ -11,8 +11,8 @@ open class Outer {
|
||||
|
||||
class Derived : Outer() {
|
||||
fun foo() {
|
||||
Outer.<!HIDDEN!>PrivateNested<!>()
|
||||
super.<!HIDDEN!>PrivateInner<!>()
|
||||
Outer.<!INVISIBLE_REFERENCE!>PrivateNested<!>()
|
||||
super.<!INVISIBLE_REFERENCE!>PrivateInner<!>()
|
||||
|
||||
Outer.ProtectedNested()
|
||||
super.ProtectedInner()
|
||||
@@ -23,11 +23,11 @@ class Derived : Outer() {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
Outer.<!HIDDEN!>PrivateNested<!>()
|
||||
Outer().<!HIDDEN!>PrivateInner<!>()
|
||||
Outer.<!INVISIBLE_REFERENCE!>PrivateNested<!>()
|
||||
Outer().<!INVISIBLE_REFERENCE!>PrivateInner<!>()
|
||||
|
||||
Outer.<!HIDDEN!>ProtectedNested<!>()
|
||||
Outer().<!HIDDEN!>ProtectedInner<!>()
|
||||
Outer.<!INVISIBLE_REFERENCE!>ProtectedNested<!>()
|
||||
Outer().<!INVISIBLE_REFERENCE!>ProtectedInner<!>()
|
||||
|
||||
Outer.PublicNested()
|
||||
Outer().PublicInner()
|
||||
|
||||
+1
-1
@@ -19,5 +19,5 @@ package c
|
||||
import b.F
|
||||
|
||||
fun f() {
|
||||
F().<!HIDDEN!>m<!>
|
||||
F().<!INVISIBLE_REFERENCE!>m<!>
|
||||
}
|
||||
|
||||
@@ -26,19 +26,19 @@ package b
|
||||
|
||||
import a.MyJavaClass
|
||||
|
||||
val <!EXPOSED_PROPERTY_TYPE!>mc1<!> = <!HIDDEN!>MyJavaClass<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>mc1<!> = <!INVISIBLE_REFERENCE!>MyJavaClass<!>()
|
||||
|
||||
val x = <!HIDDEN!>MyJavaClass<!>.<!HIDDEN!>staticMethod<!>()
|
||||
val y = MyJavaClass.<!HIDDEN!>NestedClass<!>.<!HIDDEN!>staticMethodOfNested<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>z<!> = <!HIDDEN!>MyJavaClass<!>.<!HIDDEN!>NestedClass<!>()
|
||||
val x = <!INVISIBLE_REFERENCE!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>staticMethod<!>()
|
||||
val y = MyJavaClass.<!INVISIBLE_REFERENCE!>NestedClass<!>.<!INVISIBLE_REFERENCE!>staticMethodOfNested<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>z<!> = <!INVISIBLE_REFERENCE!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>NestedClass<!>()
|
||||
|
||||
//FILE: c.kt
|
||||
package a.c
|
||||
|
||||
import a.MyJavaClass
|
||||
|
||||
val <!EXPOSED_PROPERTY_TYPE!>mc1<!> = <!HIDDEN!>MyJavaClass<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>mc1<!> = <!INVISIBLE_REFERENCE!>MyJavaClass<!>()
|
||||
|
||||
val x = <!HIDDEN!>MyJavaClass<!>.<!HIDDEN!>staticMethod<!>()
|
||||
val y = MyJavaClass.<!HIDDEN!>NestedClass<!>.<!HIDDEN!>staticMethodOfNested<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>z<!> = <!HIDDEN!>MyJavaClass<!>.<!HIDDEN!>NestedClass<!>()
|
||||
val x = <!INVISIBLE_REFERENCE!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>staticMethod<!>()
|
||||
val y = MyJavaClass.<!INVISIBLE_REFERENCE!>NestedClass<!>.<!INVISIBLE_REFERENCE!>staticMethodOfNested<!>()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>z<!> = <!INVISIBLE_REFERENCE!>MyJavaClass<!>.<!INVISIBLE_REFERENCE!>NestedClass<!>()
|
||||
|
||||
+1
-1
@@ -17,5 +17,5 @@ public class A {
|
||||
package bar
|
||||
|
||||
fun main() {
|
||||
foo.A.<!HIDDEN!>f<!> {}
|
||||
foo.A.<!INVISIBLE_REFERENCE!>f<!> {}
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ package a
|
||||
import p.Foo
|
||||
import p.Foo.Nested
|
||||
|
||||
class Bar : <!EXPOSED_SUPER_CLASS, HIDDEN!>Foo<!>() {
|
||||
class Bar : <!EXPOSED_SUPER_CLASS, INVISIBLE_REFERENCE!>Foo<!>() {
|
||||
protected fun <!EXPOSED_FUNCTION_RETURN_TYPE!>foo<!>(): Nested? = null
|
||||
}
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ internal class B
|
||||
import p.*
|
||||
|
||||
fun test() {
|
||||
val _a = <!HIDDEN!>a<!>
|
||||
val _v = <!HIDDEN!>v<!>
|
||||
<!HIDDEN!>a<!>()
|
||||
<!HIDDEN!>B<!>()
|
||||
val _a = <!INVISIBLE_REFERENCE!>a<!>
|
||||
val _v = <!INVISIBLE_REFERENCE!>v<!>
|
||||
<!INVISIBLE_REFERENCE!>a<!>()
|
||||
<!INVISIBLE_REFERENCE!>B<!>()
|
||||
|
||||
val inst = A()
|
||||
val ia = inst.<!HIDDEN!>a<!>
|
||||
val iv = inst.<!HIDDEN!>v<!>
|
||||
inst.<!HIDDEN!>a<!>()
|
||||
inst.<!HIDDEN!>B<!>()
|
||||
val ia = inst.<!INVISIBLE_REFERENCE!>a<!>
|
||||
val iv = inst.<!INVISIBLE_REFERENCE!>v<!>
|
||||
inst.<!INVISIBLE_REFERENCE!>a<!>()
|
||||
inst.<!INVISIBLE_REFERENCE!>B<!>()
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@ private val a = 1
|
||||
|
||||
package p
|
||||
|
||||
val b = <!HIDDEN!>a<!> // same package, same module
|
||||
val b = <!INVISIBLE_REFERENCE!>a<!> // same package, same module
|
||||
|
||||
// MODULE: m2(m1)
|
||||
// FILE: c.kt
|
||||
|
||||
package p
|
||||
|
||||
val c = <!HIDDEN!>a<!> // same package, another module
|
||||
val c = <!INVISIBLE_REFERENCE!>a<!> // same package, another module
|
||||
|
||||
+16
-16
@@ -30,27 +30,27 @@ internal class B
|
||||
import p.*
|
||||
|
||||
fun test() {
|
||||
val _a = <!HIDDEN!>a<!>
|
||||
val _v = <!HIDDEN!>v<!>
|
||||
<!HIDDEN!>a<!>()
|
||||
<!HIDDEN!>B<!>()
|
||||
val _a = <!INVISIBLE_REFERENCE!>a<!>
|
||||
val _v = <!INVISIBLE_REFERENCE!>v<!>
|
||||
<!INVISIBLE_REFERENCE!>a<!>()
|
||||
<!INVISIBLE_REFERENCE!>B<!>()
|
||||
|
||||
val inst = A()
|
||||
val ia = inst.<!HIDDEN!>a<!>
|
||||
val iv = inst.<!HIDDEN!>v<!>
|
||||
inst.<!HIDDEN!>a<!>()
|
||||
inst.<!HIDDEN!>B<!>()
|
||||
val ia = inst.<!INVISIBLE_REFERENCE!>a<!>
|
||||
val iv = inst.<!INVISIBLE_REFERENCE!>v<!>
|
||||
inst.<!INVISIBLE_REFERENCE!>a<!>()
|
||||
inst.<!INVISIBLE_REFERENCE!>B<!>()
|
||||
}
|
||||
|
||||
inline fun testInline() {
|
||||
val _a = <!HIDDEN!>a<!>
|
||||
val _v = <!HIDDEN!>v<!>
|
||||
<!HIDDEN!>a<!>()
|
||||
<!HIDDEN!>B<!>()
|
||||
val _a = <!INVISIBLE_REFERENCE!>a<!>
|
||||
val _v = <!INVISIBLE_REFERENCE!>v<!>
|
||||
<!INVISIBLE_REFERENCE!>a<!>()
|
||||
<!INVISIBLE_REFERENCE!>B<!>()
|
||||
|
||||
val inst = A()
|
||||
val ia = inst.<!HIDDEN!>a<!>
|
||||
val iv = inst.<!HIDDEN!>v<!>
|
||||
inst.<!HIDDEN!>a<!>()
|
||||
inst.<!HIDDEN!>B<!>()
|
||||
val ia = inst.<!INVISIBLE_REFERENCE!>a<!>
|
||||
val iv = inst.<!INVISIBLE_REFERENCE!>v<!>
|
||||
inst.<!INVISIBLE_REFERENCE!>a<!>()
|
||||
inst.<!INVISIBLE_REFERENCE!>B<!>()
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@ package example
|
||||
fun test() {
|
||||
val p = test.Public()
|
||||
if (p.public is Int) p.public + 1
|
||||
if (p.<!HIDDEN!>protected<!> is Int) p.<!HIDDEN!>protected<!> <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
if (p.<!INVISIBLE_REFERENCE!>protected<!> is Int) p.<!INVISIBLE_REFERENCE!>protected<!> <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
if (p.internal is Int) p.internal + 1
|
||||
val i = test.Internal()
|
||||
if (i.public is Int) i.public + 1
|
||||
if (i.<!HIDDEN!>protected<!> is Int) i.<!HIDDEN!>protected<!> <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
if (i.<!INVISIBLE_REFERENCE!>protected<!> is Int) i.<!INVISIBLE_REFERENCE!>protected<!> <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
if (i.internal is Int) i.internal + 1
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -17,11 +17,11 @@ class C1
|
||||
// FILE: 2.kt
|
||||
package pp
|
||||
|
||||
<!HIDDEN!>@A(<!HIDDEN!>foo<!>)<!>
|
||||
<!INVISIBLE_REFERENCE!>@A(<!INVISIBLE_REFERENCE!>foo<!>)<!>
|
||||
fun f2() {}
|
||||
|
||||
<!HIDDEN!>@A(<!HIDDEN!>foo<!>)<!>
|
||||
<!INVISIBLE_REFERENCE!>@A(<!INVISIBLE_REFERENCE!>foo<!>)<!>
|
||||
val p2 = ""
|
||||
|
||||
<!HIDDEN!>@A(<!HIDDEN!>foo<!>)<!>
|
||||
<!INVISIBLE_REFERENCE!>@A(<!INVISIBLE_REFERENCE!>foo<!>)<!>
|
||||
class C2
|
||||
|
||||
@@ -30,20 +30,20 @@ package a
|
||||
fun test() {
|
||||
val y = makeA()
|
||||
y.bar()
|
||||
<!HIDDEN!>foo<!>()
|
||||
<!INVISIBLE_REFERENCE!>foo<!>()
|
||||
|
||||
val u : A = <!HIDDEN!>A<!>()
|
||||
val u : A = <!INVISIBLE_REFERENCE!>A<!>()
|
||||
|
||||
val z = <!HIDDEN!>x<!>
|
||||
<!HIDDEN!>x<!> = 30
|
||||
val z = <!INVISIBLE_REFERENCE!>x<!>
|
||||
<!INVISIBLE_REFERENCE!>x<!> = 30
|
||||
|
||||
val po = <!HIDDEN!>PO<!>
|
||||
val po = <!INVISIBLE_REFERENCE!>PO<!>
|
||||
|
||||
val v = xx
|
||||
xx = 40
|
||||
}
|
||||
|
||||
class B : <!EXPOSED_SUPER_CLASS, HIDDEN!>A<!>() {}
|
||||
class B : <!EXPOSED_SUPER_CLASS, INVISIBLE_REFERENCE!>A<!>() {}
|
||||
|
||||
class Q {
|
||||
class W {
|
||||
|
||||
+2
-2
@@ -5,6 +5,6 @@ class My {
|
||||
}
|
||||
|
||||
fun My.foo(i: Int) {
|
||||
<!HIDDEN!>i<!>("")
|
||||
<!HIDDEN!>1<!>("")
|
||||
<!INVISIBLE_REFERENCE!>i<!>("")
|
||||
<!INVISIBLE_REFERENCE!>1<!>("")
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ fun test() {
|
||||
val interface_as_fun = <!UNRESOLVED_REFERENCE!>A<!>()
|
||||
val interface_as_val = A
|
||||
|
||||
val object_as_fun = <!HIDDEN!>B<!>()
|
||||
val object_as_fun = <!INVISIBLE_REFERENCE!>B<!>()
|
||||
val class_as_val = C
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -11,7 +11,7 @@ fun testX() {
|
||||
val interface_as_fun = X.<!UNRESOLVED_REFERENCE!>A<!>()
|
||||
val interface_as_val = X.A
|
||||
|
||||
val object_as_fun = X.<!HIDDEN!>B<!>()
|
||||
val object_as_fun = X.<!INVISIBLE_REFERENCE!>B<!>()
|
||||
val class_as_val = X.C
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ fun testY() {
|
||||
val interface_as_fun = Y.<!UNRESOLVED_REFERENCE!>A<!>()
|
||||
val interface_as_val = Y.A
|
||||
|
||||
val object_as_fun = Y.<!HIDDEN!>B<!>()
|
||||
val object_as_fun = Y.<!INVISIBLE_REFERENCE!>B<!>()
|
||||
val class_as_val = Y.C
|
||||
}
|
||||
|
||||
|
||||
@@ -19,15 +19,15 @@ open class A {
|
||||
fun fromOutside() {
|
||||
devNull(A.internal_val)
|
||||
devNull(A.public_val)
|
||||
devNull(A.<!HIDDEN!>private_val<!>)
|
||||
devNull(A.<!HIDDEN!>protected_val<!>)
|
||||
devNull(A.<!INVISIBLE_REFERENCE!>private_val<!>)
|
||||
devNull(A.<!INVISIBLE_REFERENCE!>protected_val<!>)
|
||||
}
|
||||
|
||||
class B: A() {
|
||||
fun fromSubclass() {
|
||||
devNull(A.internal_val)
|
||||
devNull(A.public_val)
|
||||
devNull(A.<!HIDDEN!>private_val<!>)
|
||||
devNull(A.<!INVISIBLE_REFERENCE!>private_val<!>)
|
||||
devNull(A.protected_val)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class G : F() {
|
||||
}
|
||||
|
||||
fun test_fun_stays_protected(g: G) {
|
||||
g.<!HIDDEN!>protected_fun<!>()
|
||||
g.<!INVISIBLE_REFERENCE!>protected_fun<!>()
|
||||
}
|
||||
|
||||
//------------
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@ class B extends A {
|
||||
// FILE: test.kt
|
||||
|
||||
fun test() {
|
||||
A.<!HIDDEN!>a<!>
|
||||
A.<!HIDDEN!>foo<!>()
|
||||
A.<!INVISIBLE_REFERENCE!>a<!>
|
||||
A.<!INVISIBLE_REFERENCE!>foo<!>()
|
||||
A.b
|
||||
A.bar()
|
||||
B.a
|
||||
|
||||
@@ -8,6 +8,6 @@ class A {
|
||||
|
||||
class B() {
|
||||
init {
|
||||
A().<!HIDDEN!>a<!> = "Hello"
|
||||
A().<!INVISIBLE_REFERENCE!>a<!> = "Hello"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ class B : A() {
|
||||
}
|
||||
|
||||
fun test(b: B) {
|
||||
b.<!HIDDEN!>x<!>()
|
||||
b.<!INVISIBLE_REFERENCE!>x<!>()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@ class A(private var i: Int, var j: Int) {
|
||||
}
|
||||
|
||||
fun test(a: A) {
|
||||
a.<!HIDDEN, HIDDEN!>i<!>++
|
||||
a.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>i<!>++
|
||||
a.j++
|
||||
}
|
||||
|
||||
@@ -7,14 +7,14 @@ open class Some {
|
||||
|
||||
class SomeSubclass : Some() {
|
||||
fun test() {
|
||||
this.<!HIDDEN!>privateField<!> // 1. Unresolved reference
|
||||
this.<!INVISIBLE_REFERENCE!>privateField<!> // 1. Unresolved reference
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val s2 = Some()
|
||||
s2.<!HIDDEN!>privateField<!> // 2. Can't access to 'privateField' in Some
|
||||
s2.<!INVISIBLE_REFERENCE!>privateField<!> // 2. Can't access to 'privateField' in Some
|
||||
|
||||
val s1 = SomeSubclass()
|
||||
s1.<!HIDDEN!>privateField<!> // 3. Unresolved reference
|
||||
s1.<!INVISIBLE_REFERENCE!>privateField<!> // 3. Unresolved reference
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ object MyObject {
|
||||
|
||||
fun test1() {
|
||||
|
||||
doSmth(MyObject.<!HIDDEN!>message<!>)
|
||||
doSmth(MyObject.<!INVISIBLE_REFERENCE!>message<!>)
|
||||
}
|
||||
|
||||
class Test {
|
||||
@@ -17,7 +17,7 @@ class Test {
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
doSmth(MyObject1.<!HIDDEN!>message<!>)
|
||||
doSmth(MyObject1.<!INVISIBLE_REFERENCE!>message<!>)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ import a.C
|
||||
|
||||
class A : C() {
|
||||
fun test() {
|
||||
val v = <!HIDDEN!>myValue<!>
|
||||
val v = <!INVISIBLE_REFERENCE!>myValue<!>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,6 +11,6 @@ class C() {
|
||||
|
||||
fun box(): String {
|
||||
val c = C()
|
||||
if (c.<!HIDDEN!>f<!> != 610) return "fail"
|
||||
if (c.<!INVISIBLE_REFERENCE!>f<!> != 610) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ class C: A() {
|
||||
}
|
||||
|
||||
class D {
|
||||
fun qux() { B().<!HIDDEN!>foo<!>() }
|
||||
fun qux() { B().<!INVISIBLE_REFERENCE!>foo<!>() }
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,6 +8,6 @@ class Foo : BaseClass() {
|
||||
fun bar() {
|
||||
val f = foo()
|
||||
f.x
|
||||
f.<!HIDDEN!>y<!>
|
||||
f.<!INVISIBLE_REFERENCE!>y<!>
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+7
-7
@@ -39,20 +39,20 @@ class KotlinClass2 : JavaClass() {
|
||||
}
|
||||
|
||||
fun test(a: KotlinClass, b: KotlinClass2) {
|
||||
a.<!HIDDEN!>foo<!>() // Error, protected_and_package declared in different package
|
||||
b.<!HIDDEN!>foo<!>() // Error, protected visibility in same package (but could be protected_and_package)
|
||||
a.<!INVISIBLE_REFERENCE!>foo<!>() // Error, protected_and_package declared in different package
|
||||
b.<!INVISIBLE_REFERENCE!>foo<!>() // Error, protected visibility in same package (but could be protected_and_package)
|
||||
|
||||
a.<!HIDDEN!>field<!>
|
||||
a.<!INVISIBLE_REFERENCE!>field<!>
|
||||
|
||||
JavaClass.<!HIDDEN!>bar1<!>()
|
||||
JavaClass.<!HIDDEN!>CONST1<!>
|
||||
JavaClass.<!INVISIBLE_REFERENCE!>bar1<!>()
|
||||
JavaClass.<!INVISIBLE_REFERENCE!>CONST1<!>
|
||||
|
||||
KotlinClass.<!UNRESOLVED_REFERENCE!>bar1<!>() // Currently it's unresolved, but it should be prohibited even in case it would be resolved
|
||||
KotlinClass.<!UNRESOLVED_REFERENCE!>CONST1<!>
|
||||
|
||||
JavaClassSamePackage.<!HIDDEN!>bar1<!>()
|
||||
JavaClassSamePackage.<!INVISIBLE_REFERENCE!>bar1<!>()
|
||||
JavaClassSamePackage.bar2()
|
||||
|
||||
JavaClassSamePackage.<!HIDDEN!>CONST1<!>
|
||||
JavaClassSamePackage.<!INVISIBLE_REFERENCE!>CONST1<!>
|
||||
JavaClassSamePackage.CONST2
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -4,8 +4,8 @@ open class A {
|
||||
|
||||
fun bar(x: B) {
|
||||
x.foo() // OK, foo declared in A
|
||||
x.<!HIDDEN!>baz<!>() // Declared in B
|
||||
x.<!HIDDEN!>foobaz<!>() // Declared in B
|
||||
x.<!INVISIBLE_REFERENCE!>baz<!>() // Declared in B
|
||||
x.<!INVISIBLE_REFERENCE!>foobaz<!>() // Declared in B
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -40,6 +40,6 @@ class B : A() {
|
||||
}
|
||||
|
||||
fun baz(a: A) {
|
||||
a.<!HIDDEN!>foo<!>
|
||||
a.<!INVISIBLE_REFERENCE!>foo<!>
|
||||
a.bar = a.bar + ""
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -27,5 +27,5 @@ class B : A() {
|
||||
}
|
||||
|
||||
fun baz(a: A) {
|
||||
a.<!HIDDEN!>foo<!> { }
|
||||
a.<!INVISIBLE_REFERENCE!>foo<!> { }
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ class B {
|
||||
}
|
||||
|
||||
fun test3(a: A) {
|
||||
a.<!HIDDEN!>v<!> //todo .bMethod()
|
||||
a.<!HIDDEN!>f<!>(0, 1) //todo .bMethod()
|
||||
a.<!INVISIBLE_REFERENCE!>v<!> //todo .bMethod()
|
||||
a.<!INVISIBLE_REFERENCE!>f<!>(0, 1) //todo .bMethod()
|
||||
}
|
||||
|
||||
interface T
|
||||
@@ -54,7 +54,7 @@ open class C : T {
|
||||
}
|
||||
|
||||
fun test4(c: C) {
|
||||
c.<!HIDDEN, HIDDEN!>i<!>++
|
||||
c.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>i<!>++
|
||||
}
|
||||
|
||||
class D : C() {
|
||||
@@ -78,7 +78,7 @@ class F : C() {
|
||||
|
||||
class G : T {
|
||||
fun test8(c: C) {
|
||||
doSmth(c.<!HIDDEN!>i<!>)
|
||||
doSmth(c.<!INVISIBLE_REFERENCE!>i<!>)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,5 +91,5 @@ import test_visibility.*
|
||||
|
||||
fun test() {
|
||||
internal_fun()
|
||||
<!HIDDEN!>private_fun<!>()
|
||||
<!INVISIBLE_REFERENCE!>private_fun<!>()
|
||||
}
|
||||
|
||||
@@ -25,15 +25,15 @@ import a.PO
|
||||
fun test() {
|
||||
val y = makeA()
|
||||
y.bar()
|
||||
<!HIDDEN!>foo<!>()
|
||||
<!INVISIBLE_REFERENCE!>foo<!>()
|
||||
|
||||
val u : A = <!HIDDEN!>A<!>()
|
||||
val u : A = <!INVISIBLE_REFERENCE!>A<!>()
|
||||
val a : java.util.Arrays.ArrayList<Int>;
|
||||
|
||||
val po = <!HIDDEN!>PO<!>
|
||||
val po = <!INVISIBLE_REFERENCE!>PO<!>
|
||||
}
|
||||
|
||||
class B : <!EXPOSED_SUPER_CLASS, HIDDEN!>A<!>() {}
|
||||
class B : <!EXPOSED_SUPER_CLASS, INVISIBLE_REFERENCE!>A<!>() {}
|
||||
|
||||
class Q {
|
||||
class W {
|
||||
|
||||
@@ -26,17 +26,17 @@ package a
|
||||
fun test() {
|
||||
val y = makeA()
|
||||
y.bar()
|
||||
<!HIDDEN!>foo<!>()
|
||||
<!INVISIBLE_REFERENCE!>foo<!>()
|
||||
|
||||
val u : A = <!HIDDEN!>A<!>()
|
||||
val u : A = <!INVISIBLE_REFERENCE!>A<!>()
|
||||
|
||||
val z = <!HIDDEN!>x<!>
|
||||
<!HIDDEN!>x<!> = 30
|
||||
val z = <!INVISIBLE_REFERENCE!>x<!>
|
||||
<!INVISIBLE_REFERENCE!>x<!> = 30
|
||||
|
||||
val po = <!HIDDEN!>PO<!>
|
||||
val po = <!INVISIBLE_REFERENCE!>PO<!>
|
||||
}
|
||||
|
||||
class B : <!EXPOSED_SUPER_CLASS, HIDDEN!>A<!>() {}
|
||||
class B : <!EXPOSED_SUPER_CLASS, INVISIBLE_REFERENCE!>A<!>() {}
|
||||
|
||||
class Q {
|
||||
class W {
|
||||
|
||||
Vendored
+1
-1
@@ -38,5 +38,5 @@ open class B3 {
|
||||
|
||||
class A3 : B3 {
|
||||
constructor()
|
||||
constructor(x: Int) : <!HIDDEN!>super<!>()
|
||||
constructor(x: Int) : <!INVISIBLE_REFERENCE!>super<!>()
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,9 +5,9 @@ import JavaClass
|
||||
|
||||
fun foo(javaClass: JavaClass) {
|
||||
javaClass.somethingPublic
|
||||
javaClass.<!HIDDEN!>somethingProtected<!>
|
||||
javaClass.<!HIDDEN!>somethingPrivate<!>
|
||||
javaClass.<!HIDDEN!>somethingPackage<!>
|
||||
javaClass.<!INVISIBLE_REFERENCE!>somethingProtected<!>
|
||||
javaClass.<!INVISIBLE_REFERENCE!>somethingPrivate<!>
|
||||
javaClass.<!INVISIBLE_REFERENCE!>somethingPackage<!>
|
||||
javaClass.somethingPublic = 1
|
||||
}
|
||||
|
||||
|
||||
Vendored
+3
-3
@@ -4,9 +4,9 @@ package k
|
||||
import JavaClass
|
||||
|
||||
fun foo(javaClass: JavaClass) {
|
||||
val v = javaClass.<!HIDDEN!>something<!>
|
||||
javaClass.<!HIDDEN!>something<!> = 1
|
||||
javaClass.<!HIDDEN, HIDDEN!>something<!>++
|
||||
val v = javaClass.<!INVISIBLE_REFERENCE!>something<!>
|
||||
javaClass.<!INVISIBLE_REFERENCE!>something<!> = 1
|
||||
javaClass.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>something<!>++
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ package k
|
||||
import JavaClass
|
||||
|
||||
fun foo(javaClass: JavaClass) {
|
||||
javaClass.<!HIDDEN!>doSomething<!> { }
|
||||
javaClass.<!INVISIBLE_REFERENCE!>doSomething<!> { }
|
||||
}
|
||||
|
||||
// FILE: KotlinFile2.kt
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// FILE: KotlinFile.kt
|
||||
fun foo(javaClass: JavaClass) {
|
||||
javaClass.<!HIDDEN!>doSomething<!> { }
|
||||
javaClass.<!INVISIBLE_REFERENCE!>doSomething<!> { }
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ package k
|
||||
import JavaClass
|
||||
|
||||
fun foo(javaClass: JavaClass) {
|
||||
javaClass.<!HIDDEN!>doSomething<!> {
|
||||
javaClass.<!INVISIBLE_REFERENCE!>doSomething<!> {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ private class C {
|
||||
|
||||
private typealias TA = C
|
||||
|
||||
private val test1: C = <!HIDDEN!>C<!>()
|
||||
private val test1: C = <!INVISIBLE_REFERENCE!>C<!>()
|
||||
private val test1co: C.Companion = <!INITIALIZER_TYPE_MISMATCH!>C<!>
|
||||
|
||||
private val test2: TA = <!INITIALIZER_TYPE_MISMATCH!>TA(<!NO_VALUE_FOR_PARAMETER!>)<!><!>
|
||||
|
||||
@@ -20,5 +20,5 @@ typealias TO = AnObject
|
||||
val test6 = <!UNRESOLVED_REFERENCE!>TI<!>()
|
||||
val test6a = <!UNRESOLVED_REFERENCE!>Interface<!>()
|
||||
|
||||
val test7 = <!HIDDEN!>TO<!>()
|
||||
val test7a = <!HIDDEN!>AnObject<!>()
|
||||
val test7 = <!INVISIBLE_REFERENCE!>TO<!>()
|
||||
val test7a = <!INVISIBLE_REFERENCE!>AnObject<!>()
|
||||
|
||||
+4
-4
@@ -12,13 +12,13 @@ val test2a = AnnotationClass()
|
||||
|
||||
enum class EnumClass { VALUE1, VALUE2 }
|
||||
typealias Test3 = EnumClass
|
||||
val test3 = <!HIDDEN!>Test3<!>()
|
||||
val test3a = <!HIDDEN!>EnumClass<!>()
|
||||
val test3 = <!INVISIBLE_REFERENCE!>Test3<!>()
|
||||
val test3a = <!INVISIBLE_REFERENCE!>EnumClass<!>()
|
||||
|
||||
sealed class SealedClass
|
||||
typealias Test4 = SealedClass
|
||||
val test4 = <!HIDDEN!>Test4<!>()
|
||||
val test4a = <!HIDDEN!>SealedClass<!>()
|
||||
val test4 = <!INVISIBLE_REFERENCE!>Test4<!>()
|
||||
val test4a = <!INVISIBLE_REFERENCE!>SealedClass<!>()
|
||||
|
||||
class Outer {
|
||||
inner class Inner
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
val foo = <!HIDDEN!>UInt<!>()
|
||||
val foo = <!INVISIBLE_REFERENCE!>UInt<!>()
|
||||
|
||||
+1
-1
@@ -33,5 +33,5 @@ class Test<in I> {
|
||||
}
|
||||
|
||||
fun <I> test(t: Test<I>) {
|
||||
t.apply(t.<!HIDDEN!>foo<!>())
|
||||
t.apply(t.<!INVISIBLE_REFERENCE!>foo<!>())
|
||||
}
|
||||
|
||||
@@ -33,5 +33,5 @@ class Test<in I, out O> {
|
||||
}
|
||||
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.apply(t.<!HIDDEN!>i<!>)
|
||||
t.apply(t.<!INVISIBLE_REFERENCE!>i<!>)
|
||||
}
|
||||
|
||||
@@ -33,5 +33,5 @@ class Test<in I, out O> {
|
||||
}
|
||||
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.<!HIDDEN!>i<!> = getT()
|
||||
t.<!INVISIBLE_REFERENCE!>i<!> = getT()
|
||||
}
|
||||
|
||||
+4
-4
@@ -74,20 +74,20 @@ class Derived : Base() {
|
||||
|
||||
class Other {
|
||||
fun test(base: Base, derived: Derived) {
|
||||
base.<!HIDDEN!>foo<!>()
|
||||
base.<!INVISIBLE_REFERENCE!>foo<!>()
|
||||
base.<!UNRESOLVED_REFERENCE!>gav<!>()
|
||||
base.<!UNRESOLVED_REFERENCE!>bar<!>()
|
||||
derived.<!HIDDEN!>foo<!>()
|
||||
derived.<!INVISIBLE_REFERENCE!>foo<!>()
|
||||
derived.<!UNRESOLVED_REFERENCE!>gav<!>()
|
||||
derived.<!UNRESOLVED_REFERENCE!>bar<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun top(base: Base, derived: Derived) {
|
||||
base.<!HIDDEN!>foo<!>()
|
||||
base.<!INVISIBLE_REFERENCE!>foo<!>()
|
||||
base.<!UNRESOLVED_REFERENCE!>bar<!>()
|
||||
base.<!UNRESOLVED_REFERENCE!>gav<!>()
|
||||
derived.<!HIDDEN!>foo<!>()
|
||||
derived.<!INVISIBLE_REFERENCE!>foo<!>()
|
||||
derived.<!UNRESOLVED_REFERENCE!>bar<!>()
|
||||
derived.<!UNRESOLVED_REFERENCE!>gav<!>()
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,27 +1,27 @@
|
||||
// !DIAGNOSTICS: -INVISIBLE_MEMBER -INVISIBLE_REFERENCE
|
||||
|
||||
// FILE: b.kt
|
||||
<!HIDDEN!>@file:JvmPackageName("")<!>
|
||||
@file:JvmPackageName("")
|
||||
package b
|
||||
fun b() {}
|
||||
|
||||
// FILE: c.kt
|
||||
<!HIDDEN!>@file:JvmPackageName("invalid-fq-name")<!>
|
||||
@file:JvmPackageName("invalid-fq-name")
|
||||
package c
|
||||
fun c() {}
|
||||
|
||||
// FILE: d.kt
|
||||
<!HIDDEN!>@file:JvmPackageName("d")<!>
|
||||
@file:JvmPackageName("d")
|
||||
package d
|
||||
class D
|
||||
fun d() {}
|
||||
|
||||
// FILE: e.kt
|
||||
<!HIDDEN!>@file:JvmPackageName(42)<!>
|
||||
@file:JvmPackageName(42)
|
||||
package e
|
||||
fun e() {}
|
||||
|
||||
// FILE: f.kt
|
||||
<!HIDDEN!>@file:JvmPackageName(f)<!>
|
||||
@file:JvmPackageName(f)
|
||||
package f
|
||||
const val name = "f"
|
||||
|
||||
+4
-4
@@ -10,19 +10,19 @@ fun newPublishedFun() {}
|
||||
annotation class Marker
|
||||
|
||||
@SinceKotlin("1.4")
|
||||
<!HIDDEN!>@WasExperimental(Marker::class)<!>
|
||||
@WasExperimental(Marker::class)
|
||||
fun newFunExperimentalInThePast() {}
|
||||
|
||||
@SinceKotlin("1.4")
|
||||
<!HIDDEN!>@WasExperimental(Marker::class)<!>
|
||||
@WasExperimental(Marker::class)
|
||||
val newValExperimentalInThePast = ""
|
||||
|
||||
@SinceKotlin("1.4")
|
||||
<!HIDDEN!>@WasExperimental(Marker::class)<!>
|
||||
@WasExperimental(Marker::class)
|
||||
class NewClassExperimentalInThePast
|
||||
|
||||
@SinceKotlin("1.4")
|
||||
<!HIDDEN!>@WasExperimental(Marker::class)<!>
|
||||
@WasExperimental(Marker::class)
|
||||
typealias TypeAliasToNewClass = NewClassExperimentalInThePast
|
||||
|
||||
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
class Foo {
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
<!HIDDEN!>@kotlin.internal.LowPriorityInOverloadResolution<!>
|
||||
val test: Bar = Bar()
|
||||
}
|
||||
|
||||
fun Foo.test() {}
|
||||
class Bar
|
||||
class Scope {
|
||||
operator fun Bar.invoke(f: () -> Unit) {}
|
||||
}
|
||||
|
||||
fun Scope.bar(e: Foo) {
|
||||
e.test {}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
class Foo {
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -DEBUG_INFO_CONSTANT -UNUSED_EXPRESSION
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> K, V, V1 : V?>
|
||||
fun <@kotlin.internal.OnlyInputTypes K, V, V1 : V?>
|
||||
Map<out K, @kotlin.internal.Exact V>.getOrDefault_Exact(key: K, defaultValue: V1): V1 = TODO()
|
||||
|
||||
fun test() {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ interface Parent
|
||||
object ChildA : Parent
|
||||
object ChildB : Parent
|
||||
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T> select(a: T, b: T) {}
|
||||
fun <@kotlin.internal.OnlyInputTypes T> select(a: T, b: T) {}
|
||||
|
||||
fun test() {
|
||||
select(ChildA, ChildB) // should be error
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
//!DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <R> Iterable<*>.filterIsInstance1(): List<@kotlin.internal.NoInfer R> = throw Exception()
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <R> List<*>.filterIsInstance2(): <!HIDDEN, HIDDEN!>@kotlin.internal.NoInfer<!> List<R> = throw Exception()
|
||||
|
||||
fun test(list: List<Int>) {
|
||||
list.filterIsInstance1<Int>().map { it * 2 }
|
||||
list.filterIsInstance2<Int>().filter { it > 10 }
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <R> foo(t: R): List<@kotlin.internal.NoInfer R> = throw Exception("$t")
|
||||
|
||||
fun test() {
|
||||
foo(1).map { it * 2 }
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <R> List<R>.foo(): <!HIDDEN, HIDDEN!>@kotlin.internal.NoInfer<!> R = throw Exception()
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <R> bar(r: R, f: Function1<@kotlin.internal.NoInfer R, Unit>): Nothing = throw Exception()
|
||||
|
||||
fun test1() {
|
||||
listOf("").foo().length
|
||||
bar(1) { x -> x + 1 }
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
//!DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
|
||||
Vendored
+3
-3
@@ -6,13 +6,13 @@ class CX : Base()
|
||||
class CY : Base()
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T> foo(a: T, b: T) {}
|
||||
fun <@kotlin.internal.OnlyInputTypes T> foo(a: T, b: T) {}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T : Any> fooA(a: T, b: T) {}
|
||||
fun <@kotlin.internal.OnlyInputTypes T : Any> fooA(a: T, b: T) {}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T : Base> fooB(a: T, b: T) {}
|
||||
fun <@kotlin.internal.OnlyInputTypes T : Base> fooB(a: T, b: T) {}
|
||||
|
||||
|
||||
fun usage(x: CX, y: CY) {
|
||||
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
|
||||
annotation class Anno
|
||||
|
||||
fun test(a: List<Class<Anno>>) {
|
||||
strictSelect(a, emptyList<Anno>().map { it.annotationClass.java })
|
||||
}
|
||||
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> S> strictSelect(arg1: S, arg2: S): S = TODO()
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
|
||||
+2
-2
@@ -3,11 +3,11 @@
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.jvm.JvmName("containsAny")
|
||||
<!HIDDEN!>@kotlin.internal.LowPriorityInOverloadResolution<!>
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
public fun <T> Iterable<T>.contains1(element: T): Int<!> = null!!
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun <T> Iterable<T>.contains1(element: <!HIDDEN, HIDDEN!>@kotlin.internal.NoInfer<!> T): Boolean<!> = null!!
|
||||
public fun <T> Iterable<T>.contains1(element: @kotlin.internal.NoInfer T): Boolean<!> = null!!
|
||||
|
||||
|
||||
fun test() {
|
||||
|
||||
+5
-5
@@ -2,13 +2,13 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> test1(t1: T, t2: <!HIDDEN, HIDDEN!>@kotlin.internal.NoInfer<!> T): T = t1
|
||||
fun <T> test1(t1: T, t2: @kotlin.internal.NoInfer T): T = t1
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> <!HIDDEN, HIDDEN!>@kotlin.internal.NoInfer<!> T.test2(t1: T): T = t1
|
||||
fun <T> @kotlin.internal.NoInfer T.test2(t1: T): T = t1
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> test3(t1: <!HIDDEN, HIDDEN!>@kotlin.internal.NoInfer<!> T): T = t1
|
||||
fun <T> test3(t1: @kotlin.internal.NoInfer T): T = t1
|
||||
|
||||
fun usage() {
|
||||
test1(1, "312")
|
||||
@@ -17,7 +17,7 @@ fun usage() {
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> List<T>.contains1(e: <!HIDDEN, HIDDEN!>@kotlin.internal.NoInfer<!> T): Boolean = true
|
||||
fun <T> List<T>.contains1(e: @kotlin.internal.NoInfer T): Boolean = true
|
||||
|
||||
fun test(i: Int?, a: Any, l: List<Int>) {
|
||||
l.contains1(a)
|
||||
@@ -26,7 +26,7 @@ fun test(i: Int?, a: Any, l: List<Int>) {
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> assertEquals1(e1: T, e2: <!HIDDEN, HIDDEN!>@kotlin.internal.NoInfer<!> T): Boolean = true
|
||||
fun <T> assertEquals1(e1: T, e2: @kotlin.internal.NoInfer T): Boolean = true
|
||||
|
||||
fun test(s: String) {
|
||||
assertEquals1(s, 11)
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// FILE: TestBase.java
|
||||
|
||||
public class TestBase<T> { }
|
||||
|
||||
// FILE: Test.java
|
||||
|
||||
public class Test<K> extends TestBase<K> { }
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> K> TestBase<out K>.foo(key: K) = null
|
||||
fun foo(result: Test<*>) {
|
||||
result.foo("sd") // Type inference failed (NI), OK in OI
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
|
||||
interface IFace<K, out V>
|
||||
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> K, V> IFace<out K, V>.get(key: K): V? = TODO()
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> I> id(arg: I): I = arg
|
||||
|
||||
interface InvBase<B>
|
||||
class DerivedInv : InvBase<DerivedInv>
|
||||
class InvRecursive<E : InvBase<E>>
|
||||
|
||||
fun test1(argument: InvRecursive<*>, receiver: IFace<InvRecursive<DerivedInv>, Any>) {
|
||||
receiver.get(argument)
|
||||
}
|
||||
|
||||
fun test2(arg: InvRecursive<out DerivedInv>) {
|
||||
id(arg)
|
||||
}
|
||||
|
||||
fun test3(arg: InvRecursive<in DerivedInv>) {
|
||||
id(arg)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T> Iterable<T>.contains1(element: T): Boolean = null!!
|
||||
public fun <@kotlin.internal.OnlyInputTypes T> Iterable<T>.contains1(element: T): Boolean = null!!
|
||||
|
||||
class In<in T>
|
||||
|
||||
|
||||
+4
-4
@@ -3,19 +3,19 @@
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.jvm.JvmName("containsAny")
|
||||
<!HIDDEN!>@kotlin.internal.LowPriorityInOverloadResolution<!>
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
public fun <T> Iterable<T>.contains1(element: T): Int<!> = null!!
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T> Iterable<T>.contains1(element: T): Boolean<!> = null!!
|
||||
public fun <@kotlin.internal.OnlyInputTypes T> Iterable<T>.contains1(element: T): Boolean<!> = null!!
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@JvmName("getAny")
|
||||
<!HIDDEN!>@kotlin.internal.LowPriorityInOverloadResolution<!>
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
public fun <K, V> Map<K, V>.get1(key: Any?): Int = null!!
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> K, V> Map<out K, V>.get1(key: K): V? = null!!
|
||||
public fun <@kotlin.internal.OnlyInputTypes K, V> Map<out K, V>.get1(key: K): V? = null!!
|
||||
|
||||
fun test(map: Map<Int, String>) {
|
||||
val a: Int = <!INITIALIZER_TYPE_MISMATCH!>listOf(1).contains1("")<!>
|
||||
|
||||
+3
-3
@@ -4,13 +4,13 @@
|
||||
class Inv<T>
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> K> Inv<out K>.onlyOut(e: K) {}
|
||||
fun <@kotlin.internal.OnlyInputTypes K> Inv<out K>.onlyOut(e: K) {}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> K : Number> Inv<out K>.onlyOutUB(e: K) {}
|
||||
fun <@kotlin.internal.OnlyInputTypes K : Number> Inv<out K>.onlyOutUB(e: K) {}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> K> Inv<in K>.onlyIn(e: K) {}
|
||||
fun <@kotlin.internal.OnlyInputTypes K> Inv<in K>.onlyIn(e: K) {}
|
||||
|
||||
fun test(
|
||||
invStar: Inv<*>,
|
||||
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
//!DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
//FILE:Foo.java
|
||||
|
||||
public class Foo {
|
||||
public static String foo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
//FILE:Bar.kt
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T> assertEquals1(t1: T, t2: T) {}
|
||||
|
||||
fun test() {
|
||||
assertEquals1(null, Foo.foo())
|
||||
assertEquals1("", Foo.foo())
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
//!DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
//FILE:Foo.java
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@
|
||||
// Issue: KT-26698
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T> Iterable<T>.contains1(element: T): Boolean = null!!
|
||||
public fun <@kotlin.internal.OnlyInputTypes T> Iterable<T>.contains1(element: T): Boolean = null!!
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T> Iterable<T>.foo(element: T): T = null!!
|
||||
public fun <@kotlin.internal.OnlyInputTypes T> Iterable<T>.foo(element: T): T = null!!
|
||||
|
||||
class Inv<T>
|
||||
class Inv2<T, R>
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@ class InB<in C : Bound>(v: C)
|
||||
class Out<out O>(val v: O)
|
||||
class OutB<out O : Bound>(val v: O)
|
||||
|
||||
fun <<!HIDDEN!>@OnlyInputTypes<!> M> strictId(arg: M): M = arg
|
||||
fun <<!HIDDEN!>@OnlyInputTypes<!> S> strictSelect(arg1: S, arg2: S): S = arg1
|
||||
fun <@OnlyInputTypes M> strictId(arg: M): M = arg
|
||||
fun <@OnlyInputTypes S> strictSelect(arg1: S, arg2: S): S = arg1
|
||||
|
||||
fun testOK(first: First, bound: Bound, second: Second) {
|
||||
strictId(Inv(15))
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ fun <T> foo(i: Inv<in T>, o: Out<T>) {
|
||||
bar(i, o)
|
||||
}
|
||||
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> K> bar(r: Inv<out K>, o: Out<K>): K = TODO()
|
||||
fun <@kotlin.internal.OnlyInputTypes K> bar(r: Inv<out K>, o: Out<K>): K = TODO()
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> S> select(a1: S, a2: S): S = TODO()
|
||||
fun <@kotlin.internal.OnlyInputTypes S> select(a1: S, a2: S): S = TODO()
|
||||
|
||||
interface Common
|
||||
class First : Common
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T> assertEquals1(t1: T, t2: T) {}
|
||||
fun <@kotlin.internal.OnlyInputTypes T> assertEquals1(t1: T, t2: T) {}
|
||||
|
||||
open class A
|
||||
class B: A()
|
||||
@@ -18,7 +18,7 @@ fun test1(a: A, b: B, c: C) {
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
public fun <<!HIDDEN!>@kotlin.internal.OnlyInputTypes<!> T> expect1(expected: T, block: () -> T) {}
|
||||
public fun <@kotlin.internal.OnlyInputTypes T> expect1(expected: T, block: () -> T) {}
|
||||
|
||||
fun test() {
|
||||
expect1(2) { byteArrayOf(1, 2, 3).indexOf(3) }
|
||||
|
||||
Vendored
-31
@@ -1,31 +0,0 @@
|
||||
// !DIAGNOSTICS: -INVISIBLE_MEMBER -INVISIBLE_REFERENCE -UNUSED_PARAMETER -NULLABLE_INLINE_PARAMETER
|
||||
|
||||
<!HIDDEN!>@kotlin.internal.InlineOnly<!>
|
||||
inline fun test() {
|
||||
|
||||
}
|
||||
|
||||
<!HIDDEN!>@kotlin.internal.InlineOnly<!>
|
||||
inline fun test3(noinline s : (Int) -> Int) {
|
||||
|
||||
}
|
||||
|
||||
<!HIDDEN!>@kotlin.internal.InlineOnly<!>
|
||||
inline fun test4(noinline s : Int.() -> Int) {
|
||||
|
||||
}
|
||||
|
||||
<!HIDDEN!>@kotlin.internal.InlineOnly<!>
|
||||
inline fun Function1<Int, Int>?.test5() {
|
||||
|
||||
}
|
||||
|
||||
<!HIDDEN!>@kotlin.internal.InlineOnly<!>
|
||||
inline fun Function1<Int, Int>?.test6() {
|
||||
|
||||
}
|
||||
|
||||
<!HIDDEN!>@kotlin.internal.InlineOnly<!>
|
||||
inline fun test2(s : ((Int) -> Int)?) {
|
||||
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -INVISIBLE_MEMBER -INVISIBLE_REFERENCE -UNUSED_PARAMETER -NULLABLE_INLINE_PARAMETER
|
||||
|
||||
@kotlin.internal.InlineOnly
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
inline fun <reified <!HIDDEN!>@kotlin.internal.PureReifiable<!> T> foo(x: T) {}
|
||||
|
||||
fun test() {
|
||||
foo<List<String>>(listOf(""))
|
||||
foo(listOf(""))
|
||||
|
||||
foo<Array<String>>(arrayOf(""))
|
||||
foo(arrayOf(""))
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
|
||||
@@ -8,11 +8,11 @@ package b
|
||||
import a.A
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
<!HIDDEN!>@kotlin.internal.HidesMembers<!>
|
||||
@kotlin.internal.HidesMembers
|
||||
fun A.forEach(i: Int) = i
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
<!HIDDEN!>@kotlin.internal.HidesMembers<!>
|
||||
@kotlin.internal.HidesMembers
|
||||
fun A.forEach(s: String) {}
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@ class A {
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
<!HIDDEN!>@kotlin.internal.HidesMembers<!>
|
||||
@kotlin.internal.HidesMembers
|
||||
fun A.forEach() = ""
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
<!HIDDEN!>@kotlin.internal.HidesMembers<!>
|
||||
@kotlin.internal.HidesMembers
|
||||
fun A.forEach(s: String) {}
|
||||
|
||||
fun test(a: A) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user