Moved @NoInfer, @Exact to internal package
This commit is contained in:
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
//!DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T, U: T> List<@Exact T>.firstTyped(): U = throw Exception()
|
||||
fun <T, U: T> List<@kotlin.internal.Exact T>.firstTyped(): U = throw Exception()
|
||||
|
||||
fun test1(l: List<Number>) {
|
||||
|
||||
|
||||
Vendored
+5
-5
@@ -1,13 +1,13 @@
|
||||
//!DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> test1(t1: T, t2: @NoInfer T): T = t1
|
||||
fun <T> test1(t1: T, t2: @kotlin.internal.NoInfer T): T = t1
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> @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: @NoInfer T): T = t1
|
||||
fun <T> test3(t1: @kotlin.internal.NoInfer T): T = t1
|
||||
|
||||
fun usage() {
|
||||
test1(1, <!TYPE_MISMATCH!>"312"<!>)
|
||||
@@ -16,14 +16,14 @@ fun usage() {
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> List<T>.contains1(e: @NoInfer T): Boolean = true
|
||||
fun <T> List<T>.contains1(e: @kotlin.internal.NoInfer T): Boolean = true
|
||||
|
||||
fun test(l: List<Number>) {
|
||||
l.contains1(<!TYPE_MISMATCH!>""<!>)
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> assertEquals1(e1: T, e2: @NoInfer T): Boolean = true
|
||||
fun <T> assertEquals1(e1: T, e2: @kotlin.internal.NoInfer T): Boolean = true
|
||||
|
||||
fun test(s: String) {
|
||||
assertEquals1(s, <!CONSTANT_EXPECTED_TYPE_MISMATCH!>11<!>)
|
||||
|
||||
@@ -19,10 +19,10 @@ package org.jetbrains.kotlin.resolve.descriptorUtil
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotated
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
|
||||
private val NO_INFER_ANNOTATION_FQ_NAME = FqName("kotlin.NoInfer")
|
||||
private val NO_INFER_ANNOTATION_FQ_NAME = FqName("kotlin.internal.NoInfer")
|
||||
|
||||
public fun Annotated.hasNoInferAnnotation(): Boolean = annotations.findAnnotation(NO_INFER_ANNOTATION_FQ_NAME) != null
|
||||
|
||||
private val EXACT_ANNOTATION_FQ_NAME = FqName("kotlin.Exact")
|
||||
private val EXACT_ANNOTATION_FQ_NAME = FqName("kotlin.internal.Exact")
|
||||
|
||||
public fun Annotated.hasExactAnnotation(): Boolean = annotations.findAnnotation(EXACT_ANNOTATION_FQ_NAME) != null
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package kotlin
|
||||
package kotlin.internal
|
||||
|
||||
/**
|
||||
* Specifies that the corresponding type should be ignored during type inference.
|
||||
@@ -2,6 +2,7 @@
|
||||
package kotlin.properties
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
import kotlin.internal.Exact
|
||||
|
||||
/**
|
||||
* Returns the value of the property for the given object from this read-only map.
|
||||
|
||||
Reference in New Issue
Block a user