[Spec tests] Add tests for call-without-an-explicit-receiver, receivers
This commit is contained in:
committed by
Victor Petukhov
parent
35de6a3f6e
commit
bb1ee952ba
Vendored
+20
-20
@@ -3,31 +3,31 @@
|
|||||||
/*
|
/*
|
||||||
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
|
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
|
||||||
*
|
*
|
||||||
* SPEC VERSION: 0.1-268
|
* SPEC VERSION: 0.1-278
|
||||||
* PLACE:overload-resolution, receivers -> paragraph 5 -> sentence 3
|
* PLACE: overload-resolution, receivers -> paragraph 5 -> sentence 3
|
||||||
* NUMBER: 1
|
* NUMBER: 1
|
||||||
* DESCRIPTION: Current class companion object receiver has higher priority than any of the superclass companion objects;
|
* DESCRIPTION: The phantom static implicit this receiver has higher priority than the current class companion object receiver;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Case() : CaseBase() {
|
|
||||||
|
|
||||||
companion object foo{
|
|
||||||
var isCaseCompanionCalled = false
|
|
||||||
fun foo(){isCaseCompanionCalled = true}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
open class CaseBase {
|
|
||||||
companion object foo {
|
|
||||||
var isCaseBaseReceiverCalled = false
|
|
||||||
fun foo() { this.isCaseBaseReceiverCalled = true }
|
|
||||||
// operator fun invoke() {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
var flag = false
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
Case.foo.foo()
|
Case1.A1.foo()
|
||||||
if (!CaseBase.isCaseBaseReceiverCalled && Case.isCaseCompanionCalled)
|
if (!flag)
|
||||||
return "OK"
|
return "OK"
|
||||||
return "NOK"
|
return "NOK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum class Case1 {
|
||||||
|
A1, A2;
|
||||||
|
|
||||||
|
companion object values {
|
||||||
|
operator fun invoke() {
|
||||||
|
flag = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
values()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+2
-2
@@ -3,8 +3,8 @@
|
|||||||
/*
|
/*
|
||||||
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
|
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
|
||||||
*
|
*
|
||||||
* SPEC VERSION: 0.1-268
|
* SPEC VERSION: 0.1-278
|
||||||
* PLACE:overload-resolution, receivers -> paragraph 5 -> sentence 3
|
* PLACE:overload-resolution, receivers -> paragraph 5 -> sentence 4
|
||||||
* NUMBER: 2
|
* NUMBER: 2
|
||||||
* DESCRIPTION: Current class companion object receiver has higher priority than any of the superclass companion objects;
|
* DESCRIPTION: Current class companion object receiver has higher priority than any of the superclass companion objects;
|
||||||
*/
|
*/
|
||||||
+3
-3
@@ -3,9 +3,9 @@
|
|||||||
/*
|
/*
|
||||||
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
|
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
|
||||||
*
|
*
|
||||||
* SPEC VERSION: 0.1-268
|
* SPEC VERSION: 0.1-278
|
||||||
* PLACE: overload-resolution, receivers -> paragraph 5 -> sentence 4
|
* PLACE: overload-resolution, receivers -> paragraph 5 -> sentence 5
|
||||||
* RELEVANT PLACES: overload-resolution, receivers -> paragraph 5 -> sentence 3
|
* RELEVANT PLACES: overload-resolution, receivers -> paragraph 5 -> sentence 4
|
||||||
* NUMBER: 1
|
* NUMBER: 1
|
||||||
* DESCRIPTION: Superclass companion object receivers are prioritized according to the inheritance order
|
* DESCRIPTION: Superclass companion object receivers are prioritized according to the inheritance order
|
||||||
*/
|
*/
|
||||||
Vendored
+14
-12
@@ -17,30 +17,32 @@
|
|||||||
],
|
],
|
||||||
"3": [
|
"3": [
|
||||||
{
|
{
|
||||||
"specVersion": "0.1-268",
|
"specVersion": "0.1-278",
|
||||||
"casesNumber": 0,
|
"casesNumber": 0,
|
||||||
"description": "Current class companion object receiver has higher priority than any of the superclass companion objects;",
|
"description": "The phantom static implicit this receiver has higher priority than the current class companion object receiver;",
|
||||||
"unexpectedBehaviour": false
|
"unexpectedBehaviour": false
|
||||||
},
|
}
|
||||||
|
],
|
||||||
|
"5": [
|
||||||
{
|
{
|
||||||
"specVersion": "0.1-268",
|
"specVersion": "0.1-278",
|
||||||
"casesNumber": 0,
|
"casesNumber": 0,
|
||||||
"description": "Superclass companion object receivers are prioritized according to the inheritance order",
|
"description": "Superclass companion object receivers are prioritized according to the inheritance order",
|
||||||
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/4.1.kt",
|
|
||||||
"unexpectedBehaviour": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"specVersion": "0.1-268",
|
|
||||||
"casesNumber": 0,
|
|
||||||
"description": "Current class companion object receiver has higher priority than any of the superclass companion objects;",
|
|
||||||
"unexpectedBehaviour": false
|
"unexpectedBehaviour": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"4": [
|
"4": [
|
||||||
{
|
{
|
||||||
"specVersion": "0.1-268",
|
"specVersion": "0.1-278",
|
||||||
"casesNumber": 0,
|
"casesNumber": 0,
|
||||||
"description": "Superclass companion object receivers are prioritized according to the inheritance order",
|
"description": "Superclass companion object receivers are prioritized according to the inheritance order",
|
||||||
|
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/5.1.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 0,
|
||||||
|
"description": "Current class companion object receiver has higher priority than any of the superclass companion objects;",
|
||||||
"unexpectedBehaviour": false
|
"unexpectedBehaviour": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
+58
@@ -0,0 +1,58 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -NOTHING_TO_INLINE
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 3
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* NUMBER: 3
|
||||||
|
* DESCRIPTION: The overload candidate sets for each pair of implicit receivers: Explicitly imported extension callables
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1Explicit
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1ExplicitDuplicate
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase1
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.*
|
||||||
|
import libPackageCase1Explicit.emptyArray
|
||||||
|
import libPackageCase1ExplicitDuplicate.emptyArray
|
||||||
|
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
class Case1(){
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!OVERLOAD_RESOLUTION_AMBIGUITY!>emptyArray<!><Int>()
|
||||||
|
}
|
||||||
|
}
|
||||||
+100
@@ -0,0 +1,100 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -NOTHING_TO_INLINE
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 4
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* NUMBER: 4
|
||||||
|
* DESCRIPTION: The overload candidate sets for each pair of implicit receivers: declared in the package scope extension callables
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.*
|
||||||
|
import libPackageCase1Explicit.emptyArray
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>fun <T> Case1.emptyArray(): Array<T><!> = TODO()
|
||||||
|
|
||||||
|
class Case1(){
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!OVERLOAD_RESOLUTION_AMBIGUITY!>emptyArray<!><Int>()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1Explicit
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
<!CONFLICTING_OVERLOADS!>fun <T> Case1.emptyArray(): Array<T><!> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
import libPackageCase2.*
|
||||||
|
import libPackageCase2Explicit.emptyArray
|
||||||
|
|
||||||
|
<!CONFLICTING_OVERLOADS!>fun <T> Case2.emptyArray(): Array<T><!> = TODO()
|
||||||
|
|
||||||
|
class Case2(){
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!OVERLOAD_RESOLUTION_AMBIGUITY!>emptyArray<!><Int>()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
class A {
|
||||||
|
operator fun invoke(): Unit = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2Explicit
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
<!CONFLICTING_OVERLOADS!>fun <T> Case2.emptyArray(): Array<T><!> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+53
@@ -0,0 +1,53 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -NOTHING_TO_INLINE
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 5
|
||||||
|
* NUMBER: 5
|
||||||
|
* DESCRIPTION: The overload candidate sets for each pair of implicit receivers: Implicitly imported extension callables
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1Duplicate
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1Explicit
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase1
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.*
|
||||||
|
import libPackageCase1Duplicate.*
|
||||||
|
import libPackageCase1Explicit.emptyArray
|
||||||
|
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
class Case1(){
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!OVERLOAD_RESOLUTION_AMBIGUITY!>emptyArray<!><Int>()
|
||||||
|
}
|
||||||
|
}
|
||||||
+166
@@ -0,0 +1,166 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -NOTHING_TO_INLINE -EXTENSION_SHADOWED_BY_MEMBER
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* NUMBER: 1
|
||||||
|
* DESCRIPTION: The overload candidate sets for each pair of implicit receivers: Local extension callables
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.*
|
||||||
|
import libPackageCase1Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case1(){
|
||||||
|
fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Case1.emptyArray; typeCall: function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1Explicit
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase1
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
import libPackageCase2.*
|
||||||
|
import libPackageCase2Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case2(){
|
||||||
|
fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
val emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Case2.emptyArray; typeCall: function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2Explicit
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase2
|
||||||
|
val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
package testsCase3
|
||||||
|
import libPackageCase3.*
|
||||||
|
import libPackageCase3Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case3(){
|
||||||
|
fun <T> Case3.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
val emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
fun <T> Case3.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
// FILE: Lib.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
|
||||||
|
package libPackageCase3
|
||||||
|
import testsCase3.*
|
||||||
|
|
||||||
|
val Case3.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case3.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
|
||||||
|
package libPackageCase3Explicit
|
||||||
|
import testsCase3.*
|
||||||
|
|
||||||
|
val Case3.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
fun <T> Case3.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
|
||||||
|
package testsCase3
|
||||||
|
val Case3.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
fun <T> Case3.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+188
@@ -0,0 +1,188 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -NOTHING_TO_INLINE
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 2
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* NUMBER: 2
|
||||||
|
* DESCRIPTION: The overload candidate sets for each pair of implicit receivers: Local extension callables
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.*
|
||||||
|
import libPackageCase1Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case1(){
|
||||||
|
|
||||||
|
fun case1_0() {
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Case1.case1_0.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
|
||||||
|
fun case1_1() {
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Case1.case1_0.case1_1.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1Explicit
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase1
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TESTCASE NUMBER: 2
|
||||||
|
* UNEXPECTED BEHAVIOUR
|
||||||
|
* ISSUES: KT-37179
|
||||||
|
*/
|
||||||
|
package testsCase2
|
||||||
|
import libPackageCase2.*
|
||||||
|
import libPackageCase2Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case2(){
|
||||||
|
|
||||||
|
fun case1_0() {
|
||||||
|
fun <T> Case2.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Case2.case1_0.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
|
||||||
|
fun case1_1() {
|
||||||
|
fun <T> Case2.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Case2.case1_0.case1_1.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
fun <T> Case2.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
fun case2_0(){
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Case2.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package libPackageCase2
|
||||||
|
import testsCase2.*
|
||||||
|
val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case2.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
|
||||||
|
package libPackageCase2Explicit
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
fun <T> Case2.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
|
||||||
|
package testsCase2
|
||||||
|
fun <T> Case2.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TESTCASE NUMBER: 3
|
||||||
|
* UNEXPECTED BEHAVIOUR
|
||||||
|
* ISSUES: KT-37179
|
||||||
|
*/
|
||||||
|
package testsCase3
|
||||||
|
import libPackageCase3.*
|
||||||
|
import libPackageCase3Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case3(){
|
||||||
|
|
||||||
|
fun case1_0() {
|
||||||
|
//fun <T> Case3.emptyArray(): Array<T> = TODO()
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>emptyArray<Int>()<!>
|
||||||
|
|
||||||
|
fun case1_1() {
|
||||||
|
// fun <T> Case3.emptyArray(): Array<T> = TODO()
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val Case3.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
//fun <T> Case3.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
fun case2_0(){
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
package libPackageCase3
|
||||||
|
import testsCase3.*
|
||||||
|
val Case3.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case3.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
|
||||||
|
package libPackageCase3Explicit
|
||||||
|
import testsCase3.*
|
||||||
|
|
||||||
|
fun <T> Case3.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
package testsCase3
|
||||||
|
fun <T> Case3.<!EXTENSION_FUNCTION_SHADOWED_BY_MEMBER_PROPERTY_WITH_INVOKE!>emptyArray<!>(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
+139
@@ -0,0 +1,139 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -NOTHING_TO_INLINE
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 3
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* NUMBER: 3
|
||||||
|
* DESCRIPTION: The overload candidate sets for each pair of implicit receivers: Explicitly imported extension callables
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.*
|
||||||
|
import libPackageCase1Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case1(){
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: libPackageCase1Explicit.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1Explicit
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase1
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
|
||||||
|
package testsCase2
|
||||||
|
import libPackageCase2.*
|
||||||
|
import libPackageCase2Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case2(){
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: libPackageCase2Explicit.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2Explicit
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase2
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
|
||||||
|
package testsCase3
|
||||||
|
import libPackageCase3.*
|
||||||
|
import libPackageCase3Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case3(){
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase3
|
||||||
|
import testsCase3.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case3.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase3Explicit
|
||||||
|
import testsCase3.*
|
||||||
|
|
||||||
|
val Case3.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
private fun <T> Case3.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase3
|
||||||
|
fun <T> Case3.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
+128
@@ -0,0 +1,128 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -NOTHING_TO_INLINE
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 4
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* NUMBER: 4
|
||||||
|
* DESCRIPTION: The overload candidate sets for each pair of implicit receivers: declared in the package scope extension callables
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.*
|
||||||
|
import libPackageCase1Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case1(){
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1Explicit
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase1
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
import libPackageCase2.*
|
||||||
|
import libPackageCase2Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case2(){
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2Explicit
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase2
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
package testsCase3
|
||||||
|
import libPackageCase3.*
|
||||||
|
import libPackageCase3Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case3(){
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase3
|
||||||
|
import testsCase3.*
|
||||||
|
|
||||||
|
fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case3.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase3Explicit
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase3
|
||||||
|
|
||||||
|
val Case3.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
private fun <T> Case3.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
+123
@@ -0,0 +1,123 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -NOTHING_TO_INLINE
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 5
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* NUMBER: 5
|
||||||
|
* DESCRIPTION: The overload candidate sets for each pair of implicit receivers: Implicitly imported extension callables
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.*
|
||||||
|
import libPackageCase1Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case1(){
|
||||||
|
|
||||||
|
fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: libPackageCase1.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
import testsCase1.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case1.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1Explicit
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase1
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
import libPackageCase2.*
|
||||||
|
import libPackageCase2Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case2(){
|
||||||
|
|
||||||
|
fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: libPackageCase2.emptyArray; typeCall: extension function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
fun <T> Case2.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2Explicit
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase2
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
package testsCase3
|
||||||
|
import libPackageCase3.*
|
||||||
|
import libPackageCase3Explicit.emptyArray
|
||||||
|
|
||||||
|
class Case3(){
|
||||||
|
|
||||||
|
fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase3
|
||||||
|
import testsCase3.*
|
||||||
|
|
||||||
|
val Case3.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
private fun <T> Case3.emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase3Explicit
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase3
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
+106
@@ -0,0 +1,106 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -NOTHING_TO_INLINE
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 4
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* NUMBER: 1
|
||||||
|
* DESCRIPTION: Top-level non-extension functions: Callables explicitly imported into the current file
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.*
|
||||||
|
import libPackageCase1Explicit.emptyArray
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: libPackageCase1Explicit.emptyArray; typeCall: function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1Explicit
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase1
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
import libPackageCase2.*
|
||||||
|
import libPackageCase2Explicit.emptyArray
|
||||||
|
|
||||||
|
fun case2() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: libPackageCase2Explicit.emptyArray; typeCall: function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2Explicit
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
val emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase2
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
package testsCase3
|
||||||
|
import libPackageCase3.*
|
||||||
|
import libPackageCase3Explicit.emptyArray
|
||||||
|
|
||||||
|
fun case3() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase3
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase3Explicit
|
||||||
|
import testsCase3.*
|
||||||
|
|
||||||
|
val emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
private fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase3
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
+90
@@ -0,0 +1,90 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -NOTHING_TO_INLINE
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 5
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* NUMBER: 1
|
||||||
|
* DESCRIPTION: Top-level non-extension functions: Callables declared in the same package
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.*
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.emptyArray; typeCall: function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase1
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
import libPackageCase2.*
|
||||||
|
|
||||||
|
fun case2() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.emptyArray; typeCall: function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase2
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
public val emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
package testsCase3
|
||||||
|
import libPackageCase3.*
|
||||||
|
|
||||||
|
fun case3() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase3
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: LibtestsPack.kt
|
||||||
|
package testsCase3
|
||||||
|
import testsCase3.*
|
||||||
|
|
||||||
|
public val emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
+76
@@ -0,0 +1,76 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 6
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* NUMBER: 1
|
||||||
|
* DESCRIPTION: Top-level non-extension functions: Callables star-imported into the current file;
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
|
||||||
|
import libPackageCase1.*
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: libPackageCase1.emptyArray; typeCall: function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
import libPackageCase2.*
|
||||||
|
|
||||||
|
fun case2() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: libPackageCase2.emptyArray; typeCall: function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class A {
|
||||||
|
operator fun <T> invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase2
|
||||||
|
import testsCase2.*
|
||||||
|
|
||||||
|
public fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
val emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
package testsCase3
|
||||||
|
import libPackageCase3.*
|
||||||
|
|
||||||
|
fun case3() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.A.invoke; typeCall: variable&invoke")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class A {
|
||||||
|
operator fun <T> invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase3
|
||||||
|
import testsCase3.*
|
||||||
|
|
||||||
|
private fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
val emptyArray: A
|
||||||
|
get() = A()
|
||||||
+54
@@ -0,0 +1,54 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 7
|
||||||
|
* RELEVANT PLACES: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 4 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 8 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 6 -> sentence 1
|
||||||
|
* NUMBER: 1
|
||||||
|
* DESCRIPTION: Top-level non-extension functions: Implicitly imported callables
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
import libPackageCase1.* //nothing to import, function emptyArray is private
|
||||||
|
|
||||||
|
fun case1() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: kotlin.emptyArray; typeCall: inline function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackageCase1
|
||||||
|
|
||||||
|
private fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testscase2
|
||||||
|
|
||||||
|
import libPackagecase2.* //nothing to import, emptyArray is private
|
||||||
|
|
||||||
|
class Case2 {
|
||||||
|
|
||||||
|
fun case2() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: kotlin.emptyArray; typeCall: inline function")!>emptyArray<Int>()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class A {
|
||||||
|
operator fun <T>invoke(): T = TODO()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Lib.kt
|
||||||
|
package libPackagecase2
|
||||||
|
import testscase2.*
|
||||||
|
private fun <T> emptyArray(): Array<T> = TODO()
|
||||||
|
|
||||||
|
private val Case2.emptyArray: A
|
||||||
|
get() = A()
|
||||||
|
|
||||||
+186
@@ -0,0 +1,186 @@
|
|||||||
|
{
|
||||||
|
"5": {
|
||||||
|
"neg": {
|
||||||
|
"2": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 1,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Implicitly imported extension callables",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 2,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: declared in the package scope extension callables",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 1,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Explicitly imported extension callables",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"pos": {
|
||||||
|
"2": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Local extension callables",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Implicitly imported extension callables",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: declared in the package scope extension callables",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Explicitly imported extension callables",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Local extension callables",
|
||||||
|
"unexpectedBehaviour": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"4": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "Top-level non-extension functions: Callables explicitly imported into the current file",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"5": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "Top-level non-extension functions: Callables declared in the same package",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"6": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "Top-level non-extension functions: Callables star-imported into the current file;",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"7": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 2,
|
||||||
|
"description": "Top-level non-extension functions: Implicitly imported callables",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"4": {
|
||||||
|
"neg": {
|
||||||
|
"1": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 1,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Implicitly imported extension callables",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg/2.5.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 2,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: declared in the package scope extension callables",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg/2.4.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 1,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Explicitly imported extension callables",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg/2.3.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"pos": {
|
||||||
|
"1": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Local extension callables",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/2.1.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Implicitly imported extension callables",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/2.5.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: declared in the package scope extension callables",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/2.4.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "Top-level non-extension functions: Callables explicitly imported into the current file",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/4.1.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "Top-level non-extension functions: Callables declared in the same package",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/5.1.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "Top-level non-extension functions: Callables star-imported into the current file;",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/6.1.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 2,
|
||||||
|
"description": "Top-level non-extension functions: Implicitly imported callables",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/7.1.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Explicitly imported extension callables",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/2.3.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 3,
|
||||||
|
"description": "The overload candidate sets for each pair of implicit receivers: Local extension callables",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/2.2.kt",
|
||||||
|
"unexpectedBehaviour": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+93
@@ -0,0 +1,93 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, receivers -> paragraph 5 -> sentence 2
|
||||||
|
* RELEVANT PLACES: overload-resolution, receivers -> paragraph 5 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* NUMBER: 1
|
||||||
|
* DESCRIPTION: The implicit this receiver has higher priority than phantom static implicit this
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
operator fun invoke() = print("invoke")
|
||||||
|
}
|
||||||
|
|
||||||
|
open class B {
|
||||||
|
operator fun invoke() = print("invoke")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Super_2 {
|
||||||
|
V1, V2;
|
||||||
|
|
||||||
|
val values = A()
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.A.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class NestedWithCompanion {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
val values = B()
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.B.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Nested {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Super_2.Nested.values; typeCall: function")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
operator fun invoke(value: String) = print("invoke $value")
|
||||||
|
}
|
||||||
|
open class B {
|
||||||
|
operator fun invoke(value: String) = print("invoke $value")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Super_2 {
|
||||||
|
V1, V2;
|
||||||
|
|
||||||
|
val valueOf = A()
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.A.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class NestedWithCompanion {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
val valueOf = B()
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.B.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Nested {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Super_2.Nested.valueOf; typeCall: function")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+163
@@ -0,0 +1,163 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, receivers -> paragraph 5 -> sentence 3
|
||||||
|
* RELEVANT PLACES: overload-resolution, receivers -> paragraph 5 -> sentence 1
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* NUMBER: 1
|
||||||
|
* DESCRIPTION: The phantom static implicit this receiver has higher priority than the current class companion object receiver
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
operator fun invoke() = print("invoke")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Super_2 {
|
||||||
|
V1, V2;
|
||||||
|
|
||||||
|
companion object values : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Super_2.values; typeCall: function")!>values()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class NestedWithCompanion {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
companion object values : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Super_2.NestedWithCompanion.values; typeCall: function")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Nested {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Super_2.Nested.values; typeCall: function")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
operator fun invoke(value: String) = print("invoke $value")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Super_2 {
|
||||||
|
V1, V2;
|
||||||
|
|
||||||
|
companion object valueOf : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Super_2.valueOf; typeCall: function")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class NestedWithCompanion {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
companion object valueOf : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Super_2.NestedWithCompanion.valueOf; typeCall: function")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Nested {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Super_2.Nested.valueOf; typeCall: function")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
package testsCase3
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
operator fun invoke() = print("invoke")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Super_2 {
|
||||||
|
V1, V2;
|
||||||
|
|
||||||
|
object values : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.Super_2.values; typeCall: function")!>values()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class NestedWithCompanion {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
object values : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.Super_2.NestedWithCompanion.values; typeCall: function")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Nested {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.Super_2.Nested.values; typeCall: function")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 4
|
||||||
|
package testsCase4
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
operator fun invoke(value: String) = print("invoke $value")
|
||||||
|
}
|
||||||
|
open class B {
|
||||||
|
operator fun invoke(value: String) = print("invoke $value")
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Super_2 {
|
||||||
|
V1, V2;
|
||||||
|
|
||||||
|
object valueOf : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase4.Super_2.valueOf; typeCall: function")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class NestedWithCompanion {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
object valueOf : B() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase4.Super_2.NestedWithCompanion.valueOf; typeCall: function")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class Nested {
|
||||||
|
V1;
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase4.Super_2.Nested.valueOf; typeCall: function")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Vendored
+202
@@ -0,0 +1,202 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||||
|
// SKIP_TXT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||||
|
*
|
||||||
|
* SPEC VERSION: 0.1-278
|
||||||
|
* PLACE: overload-resolution, receivers -> paragraph 5 -> sentence 5
|
||||||
|
* RELEVANT PLACES: overload-resolution, receivers -> paragraph 5 -> sentence 4
|
||||||
|
* overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 2
|
||||||
|
* NUMBER: 1
|
||||||
|
* DESCRIPTION: Superclass companion object receivers are prioritized according to the inheritance order
|
||||||
|
*/
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 1
|
||||||
|
package testsCase1
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
operator fun invoke() = print("invoke")
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Super_0 {
|
||||||
|
companion object values : A()
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Super_0.values.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Super_1 : Super_0 {
|
||||||
|
companion object values : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Super_1.values.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Super_2 : Super_1() {
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Super_1.values.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
class Nested : Super_1() {
|
||||||
|
companion object values : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Super_2.Nested.values.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class Inner : Super_1() {
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase1.Super_1.values.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 2
|
||||||
|
package testsCase2
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
operator fun invoke(value: String) = print("invoke $value")
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Super_0 {
|
||||||
|
companion object valueOf : A()
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Super_0.valueOf.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Super_1 : Super_0 {
|
||||||
|
companion object valueOf : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Super_1.valueOf.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Super_2 : Super_1() {
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Super_1.valueOf.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
class Nested : Super_1() {
|
||||||
|
companion object valueOf : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Super_2.Nested.valueOf.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class Inner : Super_1() {
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase2.Super_1.valueOf.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 3
|
||||||
|
package testsCase3
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
operator fun invoke() = print("invoke")
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Super_0 {
|
||||||
|
object values : A()
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.Super_0.values.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Super_1 : Super_0 {
|
||||||
|
object values : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.Super_1.values.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Super_2 : Super_1() {
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.Super_1.values.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
class Nested : Super_1() {
|
||||||
|
object values : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.Super_2.Nested.values.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class Inner : Super_1() {
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase3.Super_1.values.invoke; typeCall: variable&invoke")!>values()<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FILE: TestCase.kt
|
||||||
|
// TESTCASE NUMBER: 4
|
||||||
|
package testsCase4
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
operator fun invoke(value: String) = print("invoke $value")
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Super_0 {
|
||||||
|
object valueOf : A()
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase4.Super_0.valueOf.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Super_1 : Super_0 {
|
||||||
|
object valueOf : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase4.Super_1.valueOf.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class Super_2 : Super_1() {
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase4.Super_1.valueOf.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
class Nested : Super_1() {
|
||||||
|
object valueOf : A() {}
|
||||||
|
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase4.Super_2.Nested.valueOf.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class Inner : Super_1() {
|
||||||
|
private fun case() {
|
||||||
|
<!DEBUG_INFO_CALL("fqName: testsCase4.Super_1.valueOf.invoke; typeCall: variable&invoke")!>valueOf("")<!>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Vendored
+55
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"5": {
|
||||||
|
"pos": {
|
||||||
|
"2": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 2,
|
||||||
|
"description": "The implicit this receiver has higher priority than phantom static implicit this",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"1": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 2,
|
||||||
|
"description": "The implicit this receiver has higher priority than phantom static implicit this",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos/2.1.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 4,
|
||||||
|
"description": "The phantom static implicit this receiver has higher priority than the current class companion object receiver",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos/3.1.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"3": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 4,
|
||||||
|
"description": "The phantom static implicit this receiver has higher priority than the current class companion object receiver",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"5": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 4,
|
||||||
|
"description": "Superclass companion object receivers are prioritized according to the inheritance order",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"4": [
|
||||||
|
{
|
||||||
|
"specVersion": "0.1-278",
|
||||||
|
"casesNumber": 4,
|
||||||
|
"description": "Superclass companion object receivers are prioritized according to the inheritance order",
|
||||||
|
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos/5.1.kt",
|
||||||
|
"unexpectedBehaviour": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+166
@@ -3504,6 +3504,118 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Call_without_an_explicit_receiver extends AbstractDiagnosticsTestSpec {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCall_without_an_explicit_receiver() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class P_5 extends AbstractDiagnosticsTestSpec {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInP_5() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Neg extends AbstractDiagnosticsTestSpec {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("2.3.kt")
|
||||||
|
public void test2_3() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg/2.3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("2.4.kt")
|
||||||
|
public void test2_4() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg/2.4.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("2.5.kt")
|
||||||
|
public void test2_5() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg/2.5.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInNeg() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Pos extends AbstractDiagnosticsTestSpec {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("2.1.kt")
|
||||||
|
public void test2_1() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/2.1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("2.2.kt")
|
||||||
|
public void test2_2() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/2.2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("2.3.kt")
|
||||||
|
public void test2_3() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/2.3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("2.4.kt")
|
||||||
|
public void test2_4() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/2.4.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("2.5.kt")
|
||||||
|
public void test2_5() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/2.5.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("4.1.kt")
|
||||||
|
public void test4_1() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/4.1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("5.1.kt")
|
||||||
|
public void test5_1() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/5.1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("6.1.kt")
|
||||||
|
public void test6_1() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/6.1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("7.1.kt")
|
||||||
|
public void test7_1() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/7.1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInPos() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call")
|
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
@@ -3778,6 +3890,60 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Receivers extends AbstractDiagnosticsTestSpec {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInReceivers() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class P_5 extends AbstractDiagnosticsTestSpec {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInP_5() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Pos extends AbstractDiagnosticsTestSpec {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("2.1.kt")
|
||||||
|
public void test2_1() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos/2.1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("3.1.kt")
|
||||||
|
public void test3_1() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos/3.1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("5.1.kt")
|
||||||
|
public void test5_1() throws Exception {
|
||||||
|
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos/5.1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInPos() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements")
|
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements")
|
||||||
|
|||||||
Generated
+6
-6
@@ -3582,14 +3582,14 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
|
|||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/3.1.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/3.1.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("3.2.kt")
|
@TestMetadata("4.2.kt")
|
||||||
public void test3_2() throws Exception {
|
public void test4_2() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/3.2.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/4.2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("4.1.kt")
|
@TestMetadata("5.1.kt")
|
||||||
public void test4_1() throws Exception {
|
public void test5_1() throws Exception {
|
||||||
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/4.1.kt");
|
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-5/pos/5.1.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInPos() throws Exception {
|
public void testAllFilesPresentInPos() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user