[Spec tests] Add tests for resolving callable references and some co-tests
This commit is contained in:
+70
@@ -0,0 +1,70 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39129
|
||||
*/
|
||||
fun case1() {
|
||||
C1.<!INAPPLICABLE_CANDIDATE!>V<!>()
|
||||
|
||||
C1.Companion.<!DEBUG_INFO_CALL("fqName: C1.Companion.V.V; typeCall: function")!>V()<!>
|
||||
|
||||
}
|
||||
|
||||
class C1(){
|
||||
companion object {
|
||||
class V(){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39129
|
||||
*/
|
||||
fun case2() {
|
||||
C2.<!DEBUG_INFO_CALL("fqName: L.invoke; typeCall: variable&invoke")!>V()<!> // to (2)
|
||||
C2.Companion.<!DEBUG_INFO_CALL("fqName: C2.Companion.V.V; typeCall: function")!>V()<!> // to (1)
|
||||
}
|
||||
|
||||
open class C2(){
|
||||
companion object {
|
||||
class V //(1)
|
||||
}
|
||||
|
||||
object V : L()
|
||||
|
||||
}
|
||||
|
||||
open class L {
|
||||
operator fun invoke() {} //(2)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39129
|
||||
*/
|
||||
fun case3() {
|
||||
C3.<!DEBUG_INFO_CALL("fqName: L3.invoke; typeCall: variable&invoke")!>V()<!> // to (2)
|
||||
C3.Companion.<!DEBUG_INFO_CALL("fqName: C3.Companion.V.V; typeCall: function")!>V()<!> // to (1)
|
||||
}
|
||||
|
||||
open class C3(){
|
||||
companion object {
|
||||
class V //(1)
|
||||
}
|
||||
|
||||
object V : L3()
|
||||
|
||||
}
|
||||
|
||||
open class L3 {
|
||||
operator fun invoke(s : String ="") {} //(2)
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
// !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-401
|
||||
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver, call-with-an-explicit-type-receiver -> paragraph 3 -> sentence 2
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION:
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39129
|
||||
*/
|
||||
fun case1() {
|
||||
C1.<!UNRESOLVED_REFERENCE!>V<!>()
|
||||
|
||||
C1.Companion.<!DEBUG_INFO_CALL("fqName: C1.Companion.V.<init>; typeCall: function")!>V()<!>
|
||||
|
||||
}
|
||||
|
||||
class C1(){
|
||||
companion object {
|
||||
class V(){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39129
|
||||
*/
|
||||
fun case2() {
|
||||
C2.<!DEBUG_INFO_CALL("fqName: C2.V.invoke; typeCall: variable&invoke")!>V()<!> // to (2)
|
||||
C2.Companion.<!DEBUG_INFO_CALL("fqName: C2.Companion.V.<init>; typeCall: function")!>V()<!> // to (1)
|
||||
}
|
||||
|
||||
open class C2(){
|
||||
companion object {
|
||||
class V //(1)
|
||||
}
|
||||
|
||||
object V : L()
|
||||
|
||||
}
|
||||
|
||||
open class L {
|
||||
operator fun invoke() {} //(2)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39129
|
||||
*/
|
||||
fun case3() {
|
||||
C3.<!DEBUG_INFO_CALL("fqName: C3.V.invoke; typeCall: variable&invoke")!>V()<!> // to (2)
|
||||
C3.Companion.<!DEBUG_INFO_CALL("fqName: C3.Companion.V.<init>; typeCall: function")!>V()<!> // to (1)
|
||||
}
|
||||
|
||||
open class C3(){
|
||||
companion object {
|
||||
class V //(1)
|
||||
}
|
||||
|
||||
object V : L3()
|
||||
|
||||
}
|
||||
|
||||
open class L3 {
|
||||
operator fun invoke(s : String ="") {} //(2)
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"3": {
|
||||
"pos": {
|
||||
"2": [
|
||||
{
|
||||
"specVersion": "0.1-401",
|
||||
"casesNumber": 3,
|
||||
"description": "",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3/pos/2.1.kt",
|
||||
"unexpectedBehaviour": true,
|
||||
"linkType": "main"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
// FIR_IDENTICAL
|
||||
// !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-268
|
||||
* MAIN LINK:overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 3
|
||||
* PRIMARY LINKS: 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-with-an-explicit-receiver -> paragraph 6 -> sentence 5
|
||||
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 11 -> sentence 1
|
||||
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-trailing-lambda-expressions -> paragraph 1 -> sentence 2
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: sets of explicitly imported callables
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.*
|
||||
import kotlin.text.format
|
||||
|
||||
fun Case1() {
|
||||
|
||||
val x2 = "".<!DEBUG_INFO_CALL("fqName: kotlin.text.format; typeCall: inline extension function")!>format("")<!>
|
||||
|
||||
val y2 = String.<!DEBUG_INFO_CALL("fqName: kotlin.text.format; typeCall: inline extension function")!>format("")<!>
|
||||
}
|
||||
|
||||
fun String.invoke(format: String, vararg args: Any?): String = "" //(2)
|
||||
|
||||
val String.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
fun String.invoke(format: String, vararg args: Any?): String = ""
|
||||
|
||||
|
||||
val String.format: String
|
||||
get() = "1"
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
// FIR_IDENTICAL
|
||||
// !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-268
|
||||
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 6 -> sentence 5
|
||||
* PRIMARY LINKS: overload-resolution, building-the-overload-candidate-set-ocs, call-with-an-explicit-receiver -> paragraph 11 -> sentence 1
|
||||
* overload-resolution, building-the-overload-candidate-set-ocs, call-with-trailing-lambda-expressions -> paragraph 1 -> sentence 2
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: set of star-imported extension callables
|
||||
*/
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.*
|
||||
import kotlin.text.format
|
||||
|
||||
fun Case1() {
|
||||
//
|
||||
val x0 = "".format.invoke("")
|
||||
val x1 = "".format.<!DEBUG_INFO_CALL("fqName: testsCase1.invoke; typeCall: extension function")!>invoke("")<!>
|
||||
|
||||
//
|
||||
val y0 = String.format.invoke("")
|
||||
val y1 = String.format.<!DEBUG_INFO_CALL("fqName: testsCase1.invoke; typeCall: extension function")!>invoke("")<!>
|
||||
|
||||
}
|
||||
|
||||
fun String.invoke(format: String, vararg args: Any?): String = "" //(2)
|
||||
|
||||
val String.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
fun String.invoke(format: String, vararg args: Any?): String = ""
|
||||
|
||||
|
||||
val String.format: String
|
||||
get() = "1"
|
||||
+48
@@ -152,6 +152,14 @@
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
"description": "sets of explicitly imported callables",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/3.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 3,
|
||||
@@ -234,6 +242,14 @@
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
"description": "set of star-imported extension callables",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/5.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
@@ -242,6 +258,14 @@
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
"description": "sets of explicitly imported callables",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/3.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 3,
|
||||
@@ -398,6 +422,14 @@
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
"description": "sets of explicitly imported callables",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/3.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 3,
|
||||
@@ -658,6 +690,14 @@
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
"description": "set of star-imported extension callables",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/5.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
@@ -674,6 +714,14 @@
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
"description": "sets of explicitly imported callables",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/3.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 3,
|
||||
|
||||
+16
@@ -194,6 +194,14 @@
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
"description": "set of star-imported extension callables",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/5.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
@@ -202,6 +210,14 @@
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
"description": "sets of explicitly imported callables",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/3.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-268",
|
||||
"casesNumber": 1,
|
||||
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase1
|
||||
import libCase1.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case1() {
|
||||
<!AMBIGUITY!>Regex<!>("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase1
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* ISSUES: KT-39073
|
||||
*/
|
||||
package testPackCase2
|
||||
import libCase2.a.*
|
||||
import libCase2.b.*
|
||||
import kotlin.text.*
|
||||
|
||||
|
||||
fun case2() {
|
||||
<!AMBIGUITY!>Regex<!>("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase2.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase2.b
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase4.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39157
|
||||
*/
|
||||
package testPackCase4
|
||||
import libCase4.a.*
|
||||
import libCase4.b.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case4() {
|
||||
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!AMBIGUITY!>Regex<!>("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase4.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase4.b
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase5.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase5
|
||||
import libCase5.a.*
|
||||
import libCase5.b.*
|
||||
|
||||
fun case5() {
|
||||
<!AMBIGUITY!>Regex<!>("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase5.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase5.b
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
// FILE: TestCase6.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase6
|
||||
import libCase6.a.*
|
||||
import libCase6.b.*
|
||||
|
||||
fun case6() {
|
||||
<!AMBIGUITY!>MyRegex<!>("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase6.a
|
||||
fun MyRegex(pattern: String) {}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase6.b
|
||||
class MyRegex(pattern: String) {}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-401
|
||||
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 6
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION:
|
||||
*/
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase1
|
||||
import libCase1.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case1() {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>Regex<!>("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase1
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* ISSUES: KT-39073
|
||||
*/
|
||||
package testPackCase2
|
||||
import libCase2.a.*
|
||||
import libCase2.b.*
|
||||
import kotlin.text.*
|
||||
|
||||
|
||||
fun case2() {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>Regex<!>("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase2.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase2.b
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase4.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39157
|
||||
*/
|
||||
package testPackCase4
|
||||
import libCase4.a.*
|
||||
import libCase4.b.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case4() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase4.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase4.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase4.b
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase5.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase5
|
||||
import libCase5.a.*
|
||||
import libCase5.b.*
|
||||
|
||||
fun case5() {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>Regex<!>("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase5.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase5.b
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
// FILE: TestCase6.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase6
|
||||
import libCase6.a.*
|
||||
import libCase6.b.*
|
||||
|
||||
fun case6() {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>MyRegex<!>("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase6.a
|
||||
fun MyRegex(pattern: String) {}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase6.b
|
||||
class MyRegex(pattern: String) {}
|
||||
|
||||
|
||||
|
||||
+285
@@ -0,0 +1,285 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
*
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase1
|
||||
import libCase1.a.*
|
||||
import libCase1.b.*
|
||||
|
||||
fun case1() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase1.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase1.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
object Regex {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase1.b
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase2
|
||||
import libCase2.a.*
|
||||
import libCase2.b.*
|
||||
|
||||
fun case2() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase2.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase2.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
//object Regex {
|
||||
// operator fun invoke(s: String) {}
|
||||
//}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase2.b
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase3.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase3
|
||||
import libCase3.a.*
|
||||
import libCase3.b.*
|
||||
|
||||
fun case3() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase3.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase3.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
object Regex {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase3.b
|
||||
|
||||
class Regex(val s: String)
|
||||
|
||||
|
||||
// FILE: TestCase4.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
*/
|
||||
package testPackCase4
|
||||
import libCase4.a.*
|
||||
import libCase4.b.*
|
||||
|
||||
fun case4() {
|
||||
<!AMBIGUITY!>Regex<!>("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase4.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
//object Regex {
|
||||
// operator fun invoke(s: String) {}
|
||||
//}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase4.b
|
||||
|
||||
class Regex(val s: String)
|
||||
|
||||
|
||||
// FILE: TestCase5.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
*/
|
||||
package testPackCase5
|
||||
import libCase5.a.*
|
||||
import libCase5.b.*
|
||||
|
||||
fun case(){
|
||||
<!AMBIGUITY!>A<!>()
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase5.a
|
||||
fun A() {} //(1)
|
||||
//object A{
|
||||
// operator fun invoke(){}
|
||||
//}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase5.b
|
||||
class A()
|
||||
|
||||
// FILE: TestCase6.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase6
|
||||
import libCase6.a.*
|
||||
import libCase6.b.*
|
||||
|
||||
fun case(){
|
||||
<!DEBUG_INFO_CALL("fqName: libCase6.a.A; typeCall: function")!>A()<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>A()<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase6.a
|
||||
fun A() : String = " " //(1)
|
||||
object A{
|
||||
//operator fun invoke(){}
|
||||
}
|
||||
// FILE: Lib.kt
|
||||
package libCase6.b
|
||||
class A()
|
||||
|
||||
// FILE: TestCase7.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
*/
|
||||
package testPackCase7
|
||||
import libCase7.a.*
|
||||
import libCase7.b.*
|
||||
|
||||
fun case7(){
|
||||
<!AMBIGUITY!>A<!>()
|
||||
}
|
||||
object A{
|
||||
//operator fun invoke(){}
|
||||
}
|
||||
// FILE: Lib.kt
|
||||
package libCase7.a
|
||||
fun A() : String = " " //(1)
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase7.b
|
||||
class A()
|
||||
|
||||
// FILE: TestCase8.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase8
|
||||
import libCase8.a.*
|
||||
import libCase8.b.*
|
||||
import libCase8.c.*
|
||||
|
||||
fun case8(){
|
||||
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!AMBIGUITY!>A<!>()<!>
|
||||
<!AMBIGUITY!>A<!>()
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase8.a
|
||||
fun A() : String = " " //(1)
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase8.b
|
||||
class A()
|
||||
// FILE: Lib.kt
|
||||
package libCase8.c
|
||||
object A{
|
||||
//operator fun invoke(){}
|
||||
}
|
||||
|
||||
|
||||
// FILE: TestCase9.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 9
|
||||
*/
|
||||
package testPackCase
|
||||
import libCase9.a.*
|
||||
import libCase9.b.*
|
||||
import libCase9.c.A
|
||||
|
||||
fun case9(){
|
||||
<!AMBIGUITY!>A<!>()
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase9.a
|
||||
fun A() : String = " " //(1)
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase9.b
|
||||
class A()
|
||||
// FILE: Lib.kt
|
||||
package libCase9.c
|
||||
object A{
|
||||
//operator fun invoke(){}
|
||||
}
|
||||
|
||||
|
||||
// FILE: TestCase10.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 10
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase
|
||||
import libCase10.a.*
|
||||
import libCase10.b.*
|
||||
import libCase10.c.*
|
||||
|
||||
fun case10(){
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Ambiguity: A, [libCase10/b/A.A, libCase10/a/A]")!><!AMBIGUITY!>A<!>()<!>
|
||||
}
|
||||
|
||||
// FILE: Liba.kt
|
||||
package libCase10.a
|
||||
fun A() : String = " " //(1)
|
||||
|
||||
// FILE: Libb.kt
|
||||
package libCase10.b
|
||||
class A()
|
||||
// FILE: Libc.kt
|
||||
package libCase10.c
|
||||
interface A
|
||||
+293
@@ -0,0 +1,293 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-401
|
||||
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 6
|
||||
* NUMBER: 4
|
||||
* DESCRIPTION:
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
*
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase1
|
||||
import libCase1.a.*
|
||||
import libCase1.b.*
|
||||
|
||||
fun case1() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase1.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase1.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
object Regex {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase1.b
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase2
|
||||
import libCase2.a.*
|
||||
import libCase2.b.*
|
||||
|
||||
fun case2() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase2.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase2.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
//object Regex {
|
||||
// operator fun invoke(s: String) {}
|
||||
//}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase2.b
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase3.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase3
|
||||
import libCase3.a.*
|
||||
import libCase3.b.*
|
||||
|
||||
fun case3() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase3.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase3.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
object Regex {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase3.b
|
||||
|
||||
class Regex(val s: String)
|
||||
|
||||
|
||||
// FILE: TestCase4.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
*/
|
||||
package testPackCase4
|
||||
import libCase4.a.*
|
||||
import libCase4.b.*
|
||||
|
||||
fun case4() {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>Regex<!>("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase4.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
//object Regex {
|
||||
// operator fun invoke(s: String) {}
|
||||
//}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase4.b
|
||||
|
||||
class Regex(val s: String)
|
||||
|
||||
|
||||
// FILE: TestCase5.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
*/
|
||||
package testPackCase5
|
||||
import libCase5.a.*
|
||||
import libCase5.b.*
|
||||
|
||||
fun case(){
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>A<!>()
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase5.a
|
||||
fun A() {} //(1)
|
||||
//object A{
|
||||
// operator fun invoke(){}
|
||||
//}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase5.b
|
||||
class A()
|
||||
|
||||
// FILE: TestCase6.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase6
|
||||
import libCase6.a.*
|
||||
import libCase6.b.*
|
||||
|
||||
fun case(){
|
||||
<!DEBUG_INFO_CALL("fqName: libCase6.a.A; typeCall: function")!>A()<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>A()<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase6.a
|
||||
fun A() : String = " " //(1)
|
||||
object A{
|
||||
//operator fun invoke(){}
|
||||
}
|
||||
// FILE: Lib.kt
|
||||
package libCase6.b
|
||||
class A()
|
||||
|
||||
// FILE: TestCase7.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
*/
|
||||
package testPackCase7
|
||||
import libCase7.a.*
|
||||
import libCase7.b.*
|
||||
|
||||
fun case7(){
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>A<!>()
|
||||
}
|
||||
object A{
|
||||
//operator fun invoke(){}
|
||||
}
|
||||
// FILE: Lib.kt
|
||||
package libCase7.a
|
||||
fun A() : String = " " //(1)
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase7.b
|
||||
class A()
|
||||
|
||||
// FILE: TestCase8.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase8
|
||||
import libCase8.a.*
|
||||
import libCase8.b.*
|
||||
import libCase8.c.*
|
||||
|
||||
fun case8(){
|
||||
<!DEBUG_INFO_CALL("fqName: libCase8.a.A; typeCall: function")!>A()<!>
|
||||
A()
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase8.a
|
||||
fun A() : String = " " //(1)
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase8.b
|
||||
class A()
|
||||
// FILE: Lib.kt
|
||||
package libCase8.c
|
||||
object A{
|
||||
//operator fun invoke(){}
|
||||
}
|
||||
|
||||
|
||||
// FILE: TestCase9.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 9
|
||||
*/
|
||||
package testPackCase
|
||||
import libCase9.a.*
|
||||
import libCase9.b.*
|
||||
import libCase9.c.A
|
||||
|
||||
fun case9(){
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>A<!>()
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase9.a
|
||||
fun A() : String = " " //(1)
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase9.b
|
||||
class A()
|
||||
// FILE: Lib.kt
|
||||
package libCase9.c
|
||||
object A{
|
||||
//operator fun invoke(){}
|
||||
}
|
||||
|
||||
|
||||
// FILE: TestCase10.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 10
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39162
|
||||
*/
|
||||
package testPackCase
|
||||
import libCase10.a.*
|
||||
import libCase10.b.*
|
||||
import libCase10.c.*
|
||||
|
||||
fun case10(){
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>A()<!>
|
||||
}
|
||||
|
||||
// FILE: Liba.kt
|
||||
package libCase10.a
|
||||
fun A() : String = " " //(1)
|
||||
|
||||
// FILE: Libb.kt
|
||||
package libCase10.b
|
||||
class A()
|
||||
// FILE: Libc.kt
|
||||
package libCase10.c
|
||||
interface A
|
||||
+214
@@ -0,0 +1,214 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase1
|
||||
import libCase1.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case1() {
|
||||
Regex("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase1
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase1
|
||||
import kotlin.text.Regex
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: kotlin.text.Regex.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase1
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase2
|
||||
import libCase2.a.*
|
||||
import libCase2.b.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case2() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase2.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase2.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
//object Regex {
|
||||
// operator fun invoke(s: String) {}
|
||||
//}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase2.b
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase3.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase3
|
||||
import libCase3.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case3() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase3.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase3
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
object Regex {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
|
||||
|
||||
// FILE: TestCase4.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase4
|
||||
import libCase4.a.*
|
||||
import libCase4.b.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case4() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase4.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase4.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
object Regex {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase4.b
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: TestCase5.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase5
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: testPackCase5.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase5
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase6.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase6
|
||||
import kotlin.text.*
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: testPackCase6.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase6
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase7.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase7
|
||||
import kotlin.text.Regex
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: kotlin.text.Regex.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase7
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase8.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase8
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: testPackCase8.Regex.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase8
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase9.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 9
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase9
|
||||
import kotlin.text.*
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: testPackCase9.Regex.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase9
|
||||
class Regex(pattern: String) {}
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
// !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-401
|
||||
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 6
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION:
|
||||
*/
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase1
|
||||
import libCase1.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case1() {
|
||||
Regex("")
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase1
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase1
|
||||
import kotlin.text.Regex
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: kotlin.text.Regex.<init>; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase1
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase2
|
||||
import libCase2.a.*
|
||||
import libCase2.b.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case2() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase2.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase2.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
//object Regex {
|
||||
// operator fun invoke(s: String) {}
|
||||
//}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase2.b
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase3.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase3
|
||||
import libCase3.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case3() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase3.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase3
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
object Regex {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
|
||||
|
||||
// FILE: TestCase4.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase4
|
||||
import libCase4.a.*
|
||||
import libCase4.b.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case4() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase4.a.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase4.a
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
object Regex {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package libCase4.b
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: TestCase5.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase5
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: testPackCase5.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase5
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase6.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase6
|
||||
import kotlin.text.*
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: testPackCase6.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase6
|
||||
fun Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase7.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase7
|
||||
import kotlin.text.Regex
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: kotlin.text.Regex.<init>; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase7
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase8.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase8
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: testPackCase8.Regex.<init>; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase8
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
|
||||
// FILE: TestCase9.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 9
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
package testPackCase9
|
||||
import kotlin.text.*
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: testPackCase9.Regex.<init>; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package testPackCase9
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39073
|
||||
*/
|
||||
package testPackCase1
|
||||
|
||||
import libCase1.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case1() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase1.Regex.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase1
|
||||
class Regex(pattern: String)
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39073
|
||||
*/
|
||||
package testPackCase2
|
||||
import libCase2.*
|
||||
import lib1Case2.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case2() {
|
||||
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!AMBIGUITY!>Regex<!>("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase2
|
||||
//fun Regex(pattern: String) {}
|
||||
|
||||
object Regex {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package lib1Case2
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: TestCase3.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39073
|
||||
*/
|
||||
package testPackCase3
|
||||
import libCase3.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case3() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase3.Regex.Companion.invoke; typeCall: variable&invoke")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase3
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: TestCase4.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39073
|
||||
*/
|
||||
package testPackCase4
|
||||
import libCase4.*
|
||||
import lib1Case4.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case4() {
|
||||
<!DEBUG_INFO_CALL("fqName: libCase4.Regex.Regex; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase4
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package lib1Case4
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
// !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-401
|
||||
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, call-without-an-explicit-receiver -> paragraph 5 -> sentence 6
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION:
|
||||
*/
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39073
|
||||
*/
|
||||
package testPackCase1
|
||||
|
||||
import libCase1.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case1() {
|
||||
<!DEBUG_INFO_CALL("fqName: kotlin.text.Regex.<init>; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase1
|
||||
class Regex(pattern: String)
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39073
|
||||
*/
|
||||
package testPackCase2
|
||||
import libCase2.*
|
||||
import lib1Case2.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case2() {
|
||||
<!DEBUG_INFO_CALL("fqName: kotlin.text.Regex.<init>; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase2
|
||||
//fun Regex(pattern: String) {}
|
||||
|
||||
object Regex {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package lib1Case2
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: TestCase3.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39073
|
||||
*/
|
||||
package testPackCase3
|
||||
import libCase3.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case3() {
|
||||
<!DEBUG_INFO_CALL("fqName: kotlin.text.Regex.<init>; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase3
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: TestCase4.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39073
|
||||
*/
|
||||
package testPackCase4
|
||||
import libCase4.*
|
||||
import lib1Case4.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case4() {
|
||||
<!DEBUG_INFO_CALL("fqName: kotlin.text.Regex.<init>; typeCall: function")!>Regex("")<!>
|
||||
}
|
||||
|
||||
// FILE: Lib.kt
|
||||
package libCase4
|
||||
class Regex(pattern: String) {}
|
||||
|
||||
// FILE: Lib1.kt
|
||||
package lib1Case4
|
||||
|
||||
enum class Regex{
|
||||
;
|
||||
|
||||
companion object {
|
||||
operator fun invoke(s: String) {}
|
||||
}
|
||||
}
|
||||
+44
-10
@@ -26,6 +26,24 @@
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
}
|
||||
],
|
||||
"6": [
|
||||
{
|
||||
"specVersion": "0.1-401",
|
||||
"casesNumber": 5,
|
||||
"description": "",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg/6.1.kt",
|
||||
"unexpectedBehaviour": true,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-401",
|
||||
"casesNumber": 10,
|
||||
"description": "",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg/6.4.kt",
|
||||
"unexpectedBehaviour": true,
|
||||
"linkType": "main"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pos": {
|
||||
@@ -95,6 +113,32 @@
|
||||
"linkType": "primary"
|
||||
}
|
||||
],
|
||||
"6": [
|
||||
{
|
||||
"specVersion": "0.1-401",
|
||||
"casesNumber": 4,
|
||||
"description": "",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/6.3.kt",
|
||||
"unexpectedBehaviour": true,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-401",
|
||||
"casesNumber": 9,
|
||||
"description": "",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos/6.2.kt",
|
||||
"unexpectedBehaviour": true,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"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,
|
||||
"linkType": "main"
|
||||
}
|
||||
],
|
||||
"4": [
|
||||
{
|
||||
"specVersion": "0.1-278",
|
||||
@@ -115,16 +159,6 @@
|
||||
"linkType": "main"
|
||||
}
|
||||
],
|
||||
"6": [
|
||||
{
|
||||
"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,
|
||||
"linkType": "main"
|
||||
}
|
||||
],
|
||||
"7": [
|
||||
{
|
||||
"specVersion": "0.1-278",
|
||||
|
||||
+172
@@ -114,6 +114,16 @@
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
],
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 3,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pos": {
|
||||
@@ -177,6 +187,38 @@
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 2,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 6,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -601,6 +643,38 @@
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 2,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 6,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
}
|
||||
],
|
||||
"3": [
|
||||
@@ -733,6 +807,60 @@
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 2,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 6,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
}
|
||||
]
|
||||
},
|
||||
"neg": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 3,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
}
|
||||
],
|
||||
"4": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 3,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -849,6 +977,50 @@
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 2,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 6,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
}
|
||||
]
|
||||
},
|
||||
"neg": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 3,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39220
|
||||
*/
|
||||
package testPackCase1
|
||||
|
||||
import kotlin.reflect.KFunction2
|
||||
|
||||
interface Foo {
|
||||
fun resolve(var1: Int): String
|
||||
fun resolve(var1: String): String
|
||||
}
|
||||
|
||||
fun <T> bar(f: KFunction2<T, String, String>) {}
|
||||
|
||||
fun <T : Foo> main() {
|
||||
bar<T>(Foo::resolve) // OK in OI, Ambiguity in NI
|
||||
bar<Foo>(Foo::resolve) // OK
|
||||
bar(Foo::resolve) // OK
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// !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-413
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 1 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 1
|
||||
* overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 3
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: SAM-type against similar functional type
|
||||
*/
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-39220
|
||||
*/
|
||||
package testPackCase1
|
||||
|
||||
import kotlin.reflect.KFunction2
|
||||
|
||||
interface Foo {
|
||||
fun resolve(var1: Int): String
|
||||
fun resolve(var1: String): String
|
||||
}
|
||||
|
||||
fun <T> bar(f: KFunction2<T, String, String>) {}
|
||||
|
||||
fun <T : Foo> main() {
|
||||
bar<T>(<!TYPE_MISMATCH, TYPE_MISMATCH!>Foo::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>resolve<!><!>) // OK in OI, Ambiguity in NI
|
||||
bar<Foo>(Foo::resolve) // OK
|
||||
bar(Foo::resolve) // OK
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1() {
|
||||
companion object {
|
||||
operator fun invoke(x: CharSequence, x1: Int =1): Unit = TODO() // (3)
|
||||
operator fun invoke(x: String): String = TODO() // (4)
|
||||
}
|
||||
|
||||
fun case() {
|
||||
<!INAPPLICABLE_CANDIDATE!>Companion<!>(<!UNRESOLVED_REFERENCE!>::x<!>)
|
||||
}
|
||||
|
||||
val x = ""
|
||||
fun x() :CharSequence = ""
|
||||
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2() {
|
||||
companion object {
|
||||
operator fun invoke(x: A, x1: Int =1): Unit = TODO() // (3)
|
||||
operator fun invoke(x: B): String = TODO() // (4)
|
||||
}
|
||||
|
||||
fun case() {
|
||||
<!INAPPLICABLE_CANDIDATE!>Companion<!>(<!UNRESOLVED_REFERENCE!>::x<!>)
|
||||
}
|
||||
|
||||
val x = C()
|
||||
fun x() = B()
|
||||
|
||||
interface A
|
||||
class B : A
|
||||
class C : A
|
||||
}
|
||||
// TESTCASE NUMBER: 3
|
||||
interface I {
|
||||
companion object {
|
||||
operator fun invoke(x1: ()->CharSequence, x2: Any = ""): Unit = print(1) // (1)
|
||||
operator fun invoke(y1: ()->CharSequence, y2: String = ""): String { print(2); invoke(x1 = y1, x2 = y2) ;return "" } // (2)
|
||||
}
|
||||
}
|
||||
class Case3() : I {
|
||||
companion object {
|
||||
operator fun invoke(x1: ()->CharSequence, x2: Any = ""): Unit = print(3) // (3)
|
||||
operator fun invoke(y1: ()->CharSequence, y2: String = ""): Any { print(4); return "" } // (4)
|
||||
}
|
||||
|
||||
val x = ""
|
||||
fun x() = "" as CharSequence
|
||||
|
||||
fun case() {
|
||||
I.<!AMBIGUITY!>invoke<!>(<!UNRESOLVED_REFERENCE!>::x<!>)
|
||||
<!UNRESOLVED_REFERENCE!>I<!>(<!UNRESOLVED_REFERENCE!>::x<!>)
|
||||
<!AMBIGUITY!>Case3<!>(<!UNRESOLVED_REFERENCE!>::x<!>)
|
||||
}
|
||||
}
|
||||
+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 (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-413
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 3
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 5 -> sentence 1
|
||||
* SECONDARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 4
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 1
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 8 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: a callable reference is itself an argument to an overloaded function call
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1() {
|
||||
companion object {
|
||||
operator fun invoke(x: CharSequence, x1: Int =1): Unit = TODO() // (3)
|
||||
operator fun invoke(x: String): String = TODO() // (4)
|
||||
}
|
||||
|
||||
fun case() {
|
||||
Companion(::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>x<!>)
|
||||
}
|
||||
|
||||
val x = ""
|
||||
fun x() :CharSequence = ""
|
||||
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2() {
|
||||
companion object {
|
||||
operator fun invoke(x: A, x1: Int =1): Unit = TODO() // (3)
|
||||
operator fun invoke(x: B): String = TODO() // (4)
|
||||
}
|
||||
|
||||
fun case() {
|
||||
Companion(::<!CALLABLE_REFERENCE_RESOLUTION_AMBIGUITY!>x<!>)
|
||||
}
|
||||
|
||||
val x = C()
|
||||
fun x() = B()
|
||||
|
||||
interface A
|
||||
class B : A
|
||||
class C : A
|
||||
}
|
||||
// TESTCASE NUMBER: 3
|
||||
interface I {
|
||||
companion object {
|
||||
operator fun invoke(x1: ()->CharSequence, x2: Any = ""): Unit = print(1) // (1)
|
||||
operator fun invoke(y1: ()->CharSequence, y2: String = ""): String { print(2); invoke(x1 = y1, x2 = y2) ;return "" } // (2)
|
||||
}
|
||||
}
|
||||
class Case3() : I {
|
||||
companion object {
|
||||
operator fun invoke(x1: ()->CharSequence, x2: Any = ""): Unit = print(3) // (3)
|
||||
operator fun invoke(y1: ()->CharSequence, y2: String = ""): Any { print(4); return "" } // (4)
|
||||
}
|
||||
|
||||
val x = ""
|
||||
fun x() = "" as CharSequence
|
||||
|
||||
fun case() {
|
||||
I.<!OVERLOAD_RESOLUTION_AMBIGUITY!>invoke<!>(::<!DEBUG_INFO_MISSING_UNRESOLVED!>x<!>)
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>I<!>(::<!DEBUG_INFO_MISSING_UNRESOLVED!>x<!>)
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>Case3<!>(::<!DEBUG_INFO_MISSING_UNRESOLVED!>x<!>)
|
||||
}
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1() {
|
||||
fun foo(x: () -> CharSequence): Unit = TODO() // (3)
|
||||
fun foo(x: () -> String, z: String = ""): String = TODO() // (4)
|
||||
|
||||
fun boo() = ""
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo)<!>
|
||||
foo(::boo)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2() {
|
||||
fun foo(y: ()->Any?, x: ()->Any?): Unit = TODO() // (1.1)
|
||||
fun foo(vararg x: ()->Int): String = TODO() // (1.2)
|
||||
|
||||
fun boo() = 1
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::boo, ::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo, ::boo)<!>
|
||||
|
||||
<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo({1}, {1})<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo({1}, {1})<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
class Case3() {
|
||||
fun foo(x: ()->CharSequence, x1: String = ""): Unit = TODO() // (3)
|
||||
fun foo(x: ()->String, z: Any = ""): String = TODO() // (4)
|
||||
|
||||
fun boo() = ""
|
||||
|
||||
val boo = 1
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo)<!>
|
||||
foo(::boo)
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.String>")!>::boo<!>)
|
||||
|
||||
<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo({ "" })<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo({ "" })<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
class Case4() {
|
||||
fun foo(x: ()->CharSequence, x1: String = ""): Unit = TODO() // (3)
|
||||
fun foo(x: ()->String, z: Any = ""): String = TODO() // (4)
|
||||
|
||||
fun boo() = 1
|
||||
|
||||
val boo = ""
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: function")!>foo(::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo)<!>
|
||||
foo(::boo)
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.String>")!>::boo<!>)
|
||||
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: function")!>foo({ "" })<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo({ "" })<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
class Case5() {
|
||||
fun foo(x: ()->CharSequence, x1: String = ""): Unit = TODO() // (3)
|
||||
fun foo(x: ()->String, z: Any = ""): String = TODO() // (4)
|
||||
|
||||
fun boo() = "" as CharSequence
|
||||
|
||||
val boo = ""
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case5.foo; typeCall: function")!>foo(::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo)<!>
|
||||
foo(::boo)
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.String>")!>::boo<!>)
|
||||
|
||||
<!DEBUG_INFO_CALL("fqName: Case5.foo; typeCall: function")!>foo({ "" })<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo({ "" })<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
class Case6() {
|
||||
fun foo(x: ()->CharSequence, x1: String = ""): Unit = TODO() // (3)
|
||||
fun foo(x: ()->String, z: Any = ""): String = TODO() // (4)
|
||||
|
||||
fun boo() = ""
|
||||
|
||||
val boo = "" as CharSequence
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case6.foo; typeCall: function")!>foo(::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo)<!>
|
||||
foo(::boo)
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.String>")!>::boo<!>)
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
// !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-413
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 3
|
||||
* SECONDARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 4
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 1
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 8 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: a callable reference is itself an argument to an overloaded function call
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1() {
|
||||
fun foo(x: () -> CharSequence): Unit = TODO() // (3)
|
||||
fun foo(x: () -> String, z: String = ""): String = TODO() // (4)
|
||||
|
||||
fun boo() = ""
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo)<!>
|
||||
foo(::<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: function")!>boo<!>)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2() {
|
||||
fun foo(y: ()->Any?, x: ()->Any?): Unit = TODO() // (1.1)
|
||||
fun foo(vararg x: ()->Int): String = TODO() // (1.2)
|
||||
|
||||
fun boo() = 1
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::boo, ::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo, ::boo)<!>
|
||||
|
||||
<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo({1}, {1})<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo({1}, {1})<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
class Case3() {
|
||||
fun foo(x: ()->CharSequence, x1: String = ""): Unit = TODO() // (3)
|
||||
fun foo(x: ()->String, z: Any = ""): String = TODO() // (4)
|
||||
|
||||
fun boo() = ""
|
||||
|
||||
val boo = 1
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo)<!>
|
||||
foo(::<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo<!>)
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.String>")!>::boo<!>)
|
||||
|
||||
<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo({ "" })<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo({ "" })<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
class Case4() {
|
||||
fun foo(x: ()->CharSequence, x1: String = ""): Unit = TODO() // (3)
|
||||
fun foo(x: ()->String, z: Any = ""): String = TODO() // (4)
|
||||
|
||||
fun boo() = 1
|
||||
|
||||
val boo = ""
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: function")!>foo(::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo)<!>
|
||||
foo(::<!DEBUG_INFO_CALL("fqName: Case4.boo; typeCall: variable")!>boo<!>)
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.String>")!>::boo<!>)
|
||||
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: function")!>foo({ "" })<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo({ "" })<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
class Case5() {
|
||||
fun foo(x: ()->CharSequence, x1: String = ""): Unit = TODO() // (3)
|
||||
fun foo(x: ()->String, z: Any = ""): String = TODO() // (4)
|
||||
|
||||
fun boo() = "" as CharSequence
|
||||
|
||||
val boo = ""
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case5.foo; typeCall: function")!>foo(::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo)<!>
|
||||
foo(::<!DEBUG_INFO_CALL("fqName: Case5.boo; typeCall: variable")!>boo<!>)
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.String>")!>::boo<!>)
|
||||
|
||||
<!DEBUG_INFO_CALL("fqName: Case5.foo; typeCall: function")!>foo({ "" })<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo({ "" })<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
class Case6() {
|
||||
fun foo(x: ()->CharSequence, x1: String = ""): Unit = TODO() // (3)
|
||||
fun foo(x: ()->String, z: Any = ""): String = TODO() // (4)
|
||||
|
||||
fun boo() = ""
|
||||
|
||||
val boo = "" as CharSequence
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case6.foo; typeCall: function")!>foo(::boo)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::boo)<!>
|
||||
foo(::<!DEBUG_INFO_CALL("fqName: Case6.boo; typeCall: function")!>boo<!>)
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.String>")!>::boo<!>)
|
||||
}
|
||||
}
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1 {
|
||||
fun boo(y: () -> Int, x: () -> Number): Unit = TODO()
|
||||
fun boo(vararg x: () -> Int): String = TODO()
|
||||
|
||||
val x = 1.0
|
||||
fun x() = 1
|
||||
|
||||
fun case() {
|
||||
this.boo(::x, ::x)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: function")!>boo(::x, ::x)<!>
|
||||
this.boo(::x, ::x)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2 {
|
||||
fun boo(y: () -> Int, x: () -> Number): Unit = TODO()
|
||||
fun boo(vararg x: () -> Int): String = TODO()
|
||||
|
||||
val x = 1
|
||||
fun x() = 1.0
|
||||
|
||||
fun case() {
|
||||
this.boo(::x, ::x)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(::x, ::x)<!>
|
||||
this.boo(::x, ::x)
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
// !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-413
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 3
|
||||
* SECONDARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 4
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 1
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 8 -> sentence 1
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: a callable reference is itself an argument to an overloaded function call
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1 {
|
||||
fun boo(y: () -> Int, x: () -> Number): Unit = TODO()
|
||||
fun boo(vararg x: () -> Int): String = TODO()
|
||||
|
||||
val x = 1.0
|
||||
fun x() = 1
|
||||
|
||||
fun case() {
|
||||
this.boo(::<!DEBUG_INFO_CALL("fqName: Case1.x; typeCall: function")!>x<!>, ::x)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: function")!>boo(::x, ::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.boo(::x, ::x)<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2 {
|
||||
fun boo(y: () -> Int, x: () -> Number): Unit = TODO()
|
||||
fun boo(vararg x: () -> Int): String = TODO()
|
||||
|
||||
val x = 1
|
||||
fun x() = 1.0
|
||||
|
||||
fun case() {
|
||||
this.boo(::<!DEBUG_INFO_CALL("fqName: Case2.x; typeCall: variable")!>x<!>, ::x)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(::x, ::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.boo(::x, ::x)<!>
|
||||
}
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1() {
|
||||
fun foo(x: () -> Int): String = TODO() // (1.1)
|
||||
fun foo(x: () -> Any): Unit = TODO() // (1.2)
|
||||
|
||||
fun case1() {
|
||||
foo(::x)
|
||||
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::x)<!>
|
||||
}
|
||||
}
|
||||
|
||||
val x = 1
|
||||
fun x() = 1.0
|
||||
|
||||
fun case1(case: Case1) {
|
||||
case.foo(::x)
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(::x)<!>
|
||||
case.foo(::x)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2() {
|
||||
fun foo(vararg x: ()->Short): String = TODO() // (1.1)
|
||||
fun foo(vararg x: ()->Byte): Unit = TODO() // (1.2)
|
||||
|
||||
val x : Short = 1
|
||||
fun x() = 1
|
||||
|
||||
val y = 1
|
||||
fun y(): Short = 1
|
||||
|
||||
fun case2(case: Case2) {
|
||||
case.foo(::x, ::x)
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::x, ::x)<!>
|
||||
case.foo(::x, ::x)
|
||||
|
||||
this.foo(::x, ::x)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::x, ::x)<!>
|
||||
this.foo(::x, ::x)
|
||||
|
||||
//for y
|
||||
case.foo(::y, ::y)
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::y, ::y)<!>
|
||||
case.foo(::y, ::y)
|
||||
|
||||
this.foo(::x, ::y)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::x, ::y)<!>
|
||||
this.foo(::x, ::y)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
class Case3() {
|
||||
fun foo(vararg x: ()->Short): String = TODO() // (1.1)
|
||||
fun foo(x: ()->Byte): Unit = TODO() // (1.2)
|
||||
|
||||
val x : Short = 1
|
||||
fun x() = 1
|
||||
|
||||
val y = 1
|
||||
fun y(): Short = 1
|
||||
|
||||
fun case3(case: Case3) {
|
||||
case.foo(::x)
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(::x)<!>
|
||||
case.foo(::x)
|
||||
|
||||
this.foo(::x)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(::x)<!>
|
||||
this.foo(::x)
|
||||
|
||||
//for y
|
||||
case.foo(::y)
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(::y)<!>
|
||||
case.foo(::y)
|
||||
|
||||
this.foo(::x, ::y)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(::x, ::y)<!>
|
||||
this.foo(::x, ::y)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
class Case4() {
|
||||
infix fun foo(x: ()->Int): String = TODO() // (1.1)
|
||||
infix fun foo(x: ()->Any): Unit = TODO() // (1.2)
|
||||
|
||||
val x = 1
|
||||
fun x() = 1.0
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>this foo ::x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this foo ::x<!>
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo(::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::x)<!>
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo(::x)<!>
|
||||
this.foo(::x)
|
||||
}
|
||||
}
|
||||
|
||||
fun case4(case: Case4) {
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>case foo ::x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case foo ::x<!>
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo(::x)<!>
|
||||
case.foo(::x)
|
||||
}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
// !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-413
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 3
|
||||
* SECONDARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 4
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 1
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 8 -> sentence 1
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION: a callable reference is itself an argument to an overloaded function call
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1() {
|
||||
fun foo(x: () -> Int): String = TODO() // (1.1)
|
||||
fun foo(x: () -> Any): Unit = TODO() // (1.2)
|
||||
|
||||
fun case1() {
|
||||
foo(::<!DEBUG_INFO_CALL("fqName: x; typeCall: variable")!>x<!>)
|
||||
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::x)<!>
|
||||
}
|
||||
}
|
||||
|
||||
val x = 1
|
||||
fun x() = 1.0
|
||||
|
||||
fun case1(case: Case1) {
|
||||
case.foo(::x)
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo(::x)<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2() {
|
||||
fun foo(vararg x: ()->Short): String = TODO() // (1.1)
|
||||
fun foo(vararg x: ()->Byte): Unit = TODO() // (1.2)
|
||||
|
||||
val x : Short = 1
|
||||
fun x() = 1
|
||||
|
||||
val y = 1
|
||||
fun y(): Short = 1
|
||||
|
||||
fun case2(case: Case2) {
|
||||
case.foo(::<!DEBUG_INFO_CALL("fqName: Case2.x; typeCall: variable")!>x<!>, ::x)
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::x, ::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo(::x, ::x)<!>
|
||||
|
||||
this.foo(::<!DEBUG_INFO_CALL("fqName: Case2.x; typeCall: variable")!>x<!>, ::x)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::x, ::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.foo(::x, ::x)<!>
|
||||
|
||||
//for y
|
||||
case.foo(::<!DEBUG_INFO_CALL("fqName: Case2.y; typeCall: function")!>y<!>, ::y)
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::y, ::y)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo(::y, ::y)<!>
|
||||
|
||||
this.foo(::<!DEBUG_INFO_CALL("fqName: Case2.x; typeCall: variable")!>x<!>, ::<!DEBUG_INFO_CALL("fqName: Case2.y; typeCall: function")!>y<!>)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::x, ::y)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.foo(::x, ::y)<!>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
class Case3() {
|
||||
fun foo(vararg x: ()->Short): String = TODO() // (1.1)
|
||||
fun foo(x: ()->Byte): Unit = TODO() // (1.2)
|
||||
|
||||
val x : Short = 1
|
||||
fun x() = 1
|
||||
|
||||
val y = 1
|
||||
fun y(): Short = 1
|
||||
|
||||
fun case3(case: Case3) {
|
||||
case.foo(::<!DEBUG_INFO_CALL("fqName: Case3.x; typeCall: variable")!>x<!>)
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo(::x)<!>
|
||||
|
||||
this.foo(::<!DEBUG_INFO_CALL("fqName: Case3.x; typeCall: variable")!>x<!>)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.foo(::x)<!>
|
||||
|
||||
//for y
|
||||
case.foo(::<!DEBUG_INFO_CALL("fqName: Case3.y; typeCall: function")!>y<!>)
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(::y)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo(::y)<!>
|
||||
|
||||
this.foo(::<!DEBUG_INFO_CALL("fqName: Case3.x; typeCall: variable")!>x<!>, ::<!DEBUG_INFO_CALL("fqName: Case3.y; typeCall: function")!>y<!>)
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(::x, ::y)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.foo(::x, ::y)<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
class Case4() {
|
||||
infix fun foo(x: ()->Int): String = TODO() // (1.1)
|
||||
infix fun foo(x: ()->Any): Unit = TODO() // (1.2)
|
||||
|
||||
val x = 1
|
||||
fun x() = 1.0
|
||||
|
||||
fun case() {
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>this foo ::x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this foo ::x<!>
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo(::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::x)<!>
|
||||
this.<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo(::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.foo(::x)<!>
|
||||
}
|
||||
}
|
||||
|
||||
fun case4(case: Case4) {
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>case foo ::x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case foo ::x<!>
|
||||
case.<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo(::x)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo(::x)<!>
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1() {
|
||||
companion object {
|
||||
operator fun invoke(x: CharSequence): Unit = TODO() // (3)
|
||||
operator fun invoke(x: String): String = TODO() // (4)
|
||||
}
|
||||
fun case() {
|
||||
foo(::invoke)
|
||||
foo(::invoke)
|
||||
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(::invoke)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::invoke)<!>
|
||||
}
|
||||
|
||||
fun foo(x: (CharSequence)->Any): String = TODO() // (1.1)
|
||||
fun foo(x: (String)->Any): Unit = TODO() // (1.2)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2() {
|
||||
companion object {
|
||||
operator fun invoke(y: Any?, x: Any?): Unit = TODO() // (1.1)
|
||||
operator fun invoke(vararg x: Int): String = TODO() // (1.2)
|
||||
}
|
||||
|
||||
fun case() {
|
||||
<!INAPPLICABLE_CANDIDATE!>foo<!>(<!DEBUG_INFO_EXPRESSION_TYPE("Type is unknown"), UNRESOLVED_REFERENCE!>::invoke<!>, <!DEBUG_INFO_EXPRESSION_TYPE("Type is unknown"), UNRESOLVED_REFERENCE!>::invoke<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>foo<!>(<!UNRESOLVED_REFERENCE!>::invoke<!>, <!UNRESOLVED_REFERENCE!>::invoke<!>)
|
||||
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!INAPPLICABLE_CANDIDATE!>foo<!>(<!UNRESOLVED_REFERENCE!>::invoke<!>, <!UNRESOLVED_REFERENCE!>::invoke<!>)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(INAPPLICABLE): [/Case2.foo, /Case2.foo]")!><!INAPPLICABLE_CANDIDATE!>foo<!>(<!UNRESOLVED_REFERENCE!>::invoke<!>, <!UNRESOLVED_REFERENCE!>::invoke<!>)<!>
|
||||
}
|
||||
|
||||
fun foo(vararg x: (Int)->Any): String = TODO() // (1.1)
|
||||
fun foo(vararg x: (Any)->Any): Unit = TODO() // (1.2)
|
||||
}
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
interface I {
|
||||
companion object {
|
||||
operator fun invoke(x1: ()->String, x2: Any = ""): Unit = print(1) // (1)
|
||||
operator fun invoke(y1: ()->CharSequence, y2: String = ""): String { print(2) ;return "" } // (2)
|
||||
}
|
||||
}
|
||||
class Case3() : I {
|
||||
companion object {
|
||||
operator fun invoke(x: ()->CharSequence): Unit = print(3) // (3)
|
||||
operator fun invoke(x: ()->String, z: String = ""): Any { print(4); return "" } // (4)
|
||||
}
|
||||
|
||||
val x = ""
|
||||
fun x() = "" as CharSequence
|
||||
val y : CharSequence= ""
|
||||
fun y() = ""
|
||||
|
||||
fun case() {
|
||||
I.invoke(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.String>")!>::x<!>)
|
||||
I.invoke(::x)
|
||||
I.invoke(::x)
|
||||
|
||||
I.invoke(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.String>")!>::y<!>)
|
||||
I.invoke(::y)
|
||||
I.invoke(::y)
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>I<!>(<!DEBUG_INFO_EXPRESSION_TYPE("Type is unknown"), UNRESOLVED_REFERENCE!>::x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Unresolved name: I")!><!UNRESOLVED_REFERENCE!>I<!>(<!UNRESOLVED_REFERENCE!>::x<!>)<!>
|
||||
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!UNRESOLVED_REFERENCE!>I<!>(<!UNRESOLVED_REFERENCE!>::x<!>)<!>
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>I<!>(<!DEBUG_INFO_EXPRESSION_TYPE("Type is unknown"), UNRESOLVED_REFERENCE!>::y<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Unresolved name: I")!><!UNRESOLVED_REFERENCE!>I<!>(<!UNRESOLVED_REFERENCE!>::y<!>)<!>
|
||||
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!UNRESOLVED_REFERENCE!>I<!>(<!UNRESOLVED_REFERENCE!>::y<!>)<!>
|
||||
|
||||
Case3(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.String>")!>::x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>Case3(::x)<!>
|
||||
<!DEBUG_INFO_CALL("fqName: Case3.Companion.invoke; typeCall: variable&invoke")!>Case3(::x)<!>
|
||||
|
||||
Case3(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.String>")!>::y<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>Case3(::y)<!>
|
||||
<!DEBUG_INFO_CALL("fqName: Case3.Companion.invoke; typeCall: variable&invoke")!>Case3(::y)<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
class Case4() {
|
||||
companion object {
|
||||
operator fun invoke(x: CharSequence): Unit = TODO() // (3)
|
||||
operator fun invoke(x: String): String = TODO() // (4)
|
||||
}
|
||||
fun case(case: Case4) {
|
||||
case(::invoke)
|
||||
case(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.CharSequence, kotlin.Unit>")!>::invoke<!>)
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.invoke; typeCall: variable&invoke")!>case(::invoke)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case(::invoke)<!>
|
||||
}
|
||||
|
||||
operator fun invoke(x: (CharSequence)->Any): String = TODO() // (1.1)
|
||||
operator fun invoke(x: (String)->Any): Unit = TODO() // (1.2)
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
// !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-413
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, bidirectional-resolution-for-callable-calls -> paragraph 3 -> sentence 3
|
||||
* SECONDARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 4
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 1
|
||||
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 8 -> sentence 1
|
||||
* NUMBER: 4
|
||||
* DESCRIPTION: a callable reference is itself an argument to an overloaded function call
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1() {
|
||||
companion object {
|
||||
operator fun invoke(x: CharSequence): Unit = TODO() // (3)
|
||||
operator fun invoke(x: String): String = TODO() // (4)
|
||||
}
|
||||
fun case() {
|
||||
foo(::<!DEBUG_INFO_CALL("fqName: Case1.Companion.invoke; typeCall: operator function")!>invoke<!>)
|
||||
foo(::invoke)
|
||||
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(::invoke)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::invoke)<!>
|
||||
}
|
||||
|
||||
fun foo(x: (CharSequence)->Any): String = TODO() // (1.1)
|
||||
fun foo(x: (String)->Any): Unit = TODO() // (1.2)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2() {
|
||||
companion object {
|
||||
operator fun invoke(y: Any?, x: Any?): Unit = TODO() // (1.1)
|
||||
operator fun invoke(vararg x: Int): String = TODO() // (1.2)
|
||||
}
|
||||
|
||||
fun case() {
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.Int, kotlin.String>")!>::invoke<!>, <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.Int, kotlin.String>")!>::invoke<!>)
|
||||
foo(::<!DEBUG_INFO_CALL("fqName: Case2.Companion.invoke; typeCall: operator function")!>invoke<!>, ::<!DEBUG_INFO_CALL("fqName: Case2.Companion.invoke; typeCall: operator function")!>invoke<!>)
|
||||
<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::invoke, ::invoke)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::invoke, ::invoke)<!>
|
||||
}
|
||||
|
||||
fun foo(vararg x: (Int)->Any): String = TODO() // (1.1)
|
||||
fun foo(vararg x: (Any)->Any): Unit = TODO() // (1.2)
|
||||
}
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
interface I {
|
||||
companion object {
|
||||
operator fun invoke(x1: ()->String, x2: Any = ""): Unit = print(1) // (1)
|
||||
operator fun invoke(y1: ()->CharSequence, y2: String = ""): String { print(2) ;return "" } // (2)
|
||||
}
|
||||
}
|
||||
class Case3() : I {
|
||||
companion object {
|
||||
operator fun invoke(x: ()->CharSequence): Unit = print(3) // (3)
|
||||
operator fun invoke(x: ()->String, z: String = ""): Any { print(4); return "" } // (4)
|
||||
}
|
||||
|
||||
val x = ""
|
||||
fun x() = "" as CharSequence
|
||||
val y : CharSequence= ""
|
||||
fun y() = ""
|
||||
|
||||
fun case() {
|
||||
I.invoke(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.String>")!>::x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>I.invoke(::x)<!>
|
||||
I.invoke(::x)
|
||||
|
||||
I.invoke(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.String>")!>::y<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>I.invoke(::y)<!>
|
||||
I.invoke(::y)
|
||||
|
||||
I(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.String>")!>::x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>I(::x)<!>
|
||||
<!DEBUG_INFO_CALL("fqName: I.Companion.invoke; typeCall: variable&invoke")!>I(::x)<!>
|
||||
|
||||
I(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.String>")!>::y<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>I(::y)<!>
|
||||
<!DEBUG_INFO_CALL("fqName: I.Companion.invoke; typeCall: variable&invoke")!>I(::y)<!>
|
||||
|
||||
Case3(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.String>")!>::x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>Case3(::x)<!>
|
||||
<!DEBUG_INFO_CALL("fqName: Case3.Companion.invoke; typeCall: variable&invoke")!>Case3(::x)<!>
|
||||
|
||||
Case3(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.String>")!>::y<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>Case3(::y)<!>
|
||||
<!DEBUG_INFO_CALL("fqName: Case3.Companion.invoke; typeCall: variable&invoke")!>Case3(::y)<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
class Case4() {
|
||||
companion object {
|
||||
operator fun invoke(x: CharSequence): Unit = TODO() // (3)
|
||||
operator fun invoke(x: String): String = TODO() // (4)
|
||||
}
|
||||
fun case(case: Case4) {
|
||||
case(::<!DEBUG_INFO_CALL("fqName: Case4.Companion.invoke; typeCall: operator function")!>invoke<!>)
|
||||
case(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.CharSequence, kotlin.Unit>")!>::invoke<!>)
|
||||
<!DEBUG_INFO_CALL("fqName: Case4.invoke; typeCall: variable&invoke")!>case(::invoke)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case(::invoke)<!>
|
||||
}
|
||||
|
||||
operator fun invoke(x: (CharSequence)->Any): String = TODO() // (1.1)
|
||||
operator fun invoke(x: (String)->Any): Unit = TODO() // (1.2)
|
||||
}
|
||||
+178
@@ -0,0 +1,178 @@
|
||||
{
|
||||
"1": {
|
||||
"pos": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 1,
|
||||
"description": "SAM-type against similar functional type",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos/1.1.kt",
|
||||
"unexpectedBehaviour": true,
|
||||
"linkType": "main"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
"pos": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 1,
|
||||
"description": "SAM-type against similar functional type",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos/1.1.kt",
|
||||
"unexpectedBehaviour": true,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 2,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 6,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
}
|
||||
],
|
||||
"2": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 1,
|
||||
"description": "SAM-type against similar functional type",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos/1.1.kt",
|
||||
"unexpectedBehaviour": true,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 2,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 6,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
],
|
||||
"3": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 1,
|
||||
"description": "SAM-type against similar functional type",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos/1.1.kt",
|
||||
"unexpectedBehaviour": true,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 2,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 4,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 6,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
]
|
||||
},
|
||||
"neg": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 3,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
}
|
||||
],
|
||||
"2": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 3,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
],
|
||||
"3": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 3,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
|
||||
class Case1() {
|
||||
fun foo(x: A): A = x//(1)
|
||||
}
|
||||
|
||||
fun Case1.foo(i: B): B = i //(2)
|
||||
|
||||
class A : C
|
||||
class B : C
|
||||
interface C
|
||||
|
||||
fun <T : C> process(call: (T) -> T, x: T): T = call.invoke(x)
|
||||
|
||||
fun case1() {
|
||||
val case = Case1()
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("testsCase1.A")!>process(case::foo, A())<!>
|
||||
process(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<testsCase1.A, testsCase1.A>")!>case::foo<!>, A())
|
||||
process(case:: foo, A())
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("testsCase1.B")!>process(case::foo, B())<!>
|
||||
process(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<testsCase1.B, testsCase1.B>")!>case::foo<!>, B())
|
||||
process(case:: foo, B())
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
// !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-401
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references -> paragraph 2 -> sentence 2
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: the case of a call with a callable reference as a not parameter
|
||||
*/
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
|
||||
class Case1() {
|
||||
fun foo(x: A): A = x//(1)
|
||||
}
|
||||
|
||||
fun Case1.foo(i: B): B = i //(2)
|
||||
|
||||
class A : C
|
||||
class B : C
|
||||
interface C
|
||||
|
||||
fun <T : C> process(call: (T) -> T, x: T): T = call.invoke(x)
|
||||
|
||||
fun case1() {
|
||||
val case = Case1()
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("testsCase1.A")!>process(case::foo, A())<!>
|
||||
process(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<testsCase1.A, testsCase1.A>")!>case::foo<!>, A())
|
||||
process(case:: <!DEBUG_INFO_CALL("fqName: testsCase1.Case1.foo; typeCall: function")!>foo<!>, A())
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("testsCase1.B")!>process(case::foo, B())<!>
|
||||
process(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<testsCase1.B, testsCase1.B>")!>case::foo<!>, B())
|
||||
process(case:: <!DEBUG_INFO_CALL("fqName: testsCase1.foo; typeCall: extension function")!>foo<!>, B())
|
||||
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import testsCase1.Case1.Companion.foo
|
||||
|
||||
class Case1() {
|
||||
companion object {
|
||||
fun foo() : Case1 = TODO()
|
||||
fun foo(y: String, x: Any = "") : Case1 = TODO()
|
||||
fun foo( x: String, y: String) : Case1 = TODO()
|
||||
}
|
||||
|
||||
}
|
||||
fun case1() {
|
||||
val y0: (String)-> Case1 = ::foo
|
||||
val y1: (String)-> Case1 = Case1.Companion::foo
|
||||
val y2: (String)-> Case1 = (Case1)::foo
|
||||
}
|
||||
|
||||
fun case1_0() : (String)-> Case1 = ::foo
|
||||
fun case1_1() : (String)-> Case1 = (Case1)::foo
|
||||
fun case1_2(): (String)-> Case1 = Case1.Companion::foo
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-413
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 1 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: the case of a call with a callable reference as a not parameter
|
||||
*/
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import testsCase1.Case1.Companion.foo
|
||||
|
||||
class Case1() {
|
||||
companion object {
|
||||
fun foo() : Case1 = TODO()
|
||||
fun foo(y: String, x: Any = "") : Case1 = TODO()
|
||||
fun foo( x: String, y: String) : Case1 = TODO()
|
||||
}
|
||||
|
||||
}
|
||||
fun case1() {
|
||||
val y0: (String)-> Case1 = ::<!NONE_APPLICABLE!>foo<!>
|
||||
val y1: (String)-> Case1 = Case1.Companion::<!NONE_APPLICABLE!>foo<!>
|
||||
val y2: (String)-> Case1 = (Case1)::<!NONE_APPLICABLE!>foo<!>
|
||||
}
|
||||
|
||||
fun case1_0() : (String)-> Case1 = ::<!NONE_APPLICABLE!>foo<!>
|
||||
fun case1_1() : (String)-> Case1 = (Case1)::<!NONE_APPLICABLE!>foo<!>
|
||||
fun case1_2(): (String)-> Case1 = Case1.Companion::<!NONE_APPLICABLE!>foo<!>
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.*
|
||||
import kotlin.text.format
|
||||
|
||||
fun case1() {
|
||||
val y1 =<!UNRESOLVED_REFERENCE!>(String)::format<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase2
|
||||
import libCase2.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case2() {
|
||||
val y1 =<!UNRESOLVED_REFERENCE!>(String)::format<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase2.kt
|
||||
package libCase2
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-409
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 1 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 3
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 4
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 5
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 5 -> sentence 1
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: the case of a call with a callable reference as a not parameter
|
||||
*/
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.*
|
||||
import kotlin.text.format
|
||||
|
||||
fun case1() {
|
||||
val y1 =(String)::<!OVERLOAD_RESOLUTION_AMBIGUITY!>format<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase2
|
||||
import libCase2.*
|
||||
import kotlin.text.*
|
||||
|
||||
fun case2() {
|
||||
val y1 =(String)::<!OVERLOAD_RESOLUTION_AMBIGUITY!>format<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase2.kt
|
||||
package libCase2
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.*
|
||||
|
||||
fun case1() {
|
||||
val y1 =<!UNRESOLVED_REFERENCE!>(A)::boo<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
class A{
|
||||
companion object{}
|
||||
}
|
||||
val A.Companion.boo: String
|
||||
get() = "1"
|
||||
fun A.Companion.boo(): String =""
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase2
|
||||
import libCase2.A
|
||||
import libCase2.boo
|
||||
|
||||
fun case2() {
|
||||
val y1 =<!UNRESOLVED_REFERENCE!>(A)::boo<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase2.kt
|
||||
package libCase2
|
||||
|
||||
class A{
|
||||
companion object{}
|
||||
}
|
||||
val A.Companion.boo: String
|
||||
get() = "1"
|
||||
fun A.Companion.boo(): String =""
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-409
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 1 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 3
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 4
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 5
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 5 -> sentence 1
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION: the case of a call with a callable reference as a not parameter
|
||||
*/
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.*
|
||||
|
||||
fun case1() {
|
||||
val y1 =(A)::<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
class A{
|
||||
companion object{}
|
||||
}
|
||||
val A.Companion.boo: String
|
||||
get() = "1"
|
||||
fun A.Companion.boo(): String =""
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase2
|
||||
import libCase2.A
|
||||
import libCase2.boo
|
||||
|
||||
fun case2() {
|
||||
val y1 =(A)::<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase2.kt
|
||||
package libCase2
|
||||
|
||||
class A{
|
||||
companion object{}
|
||||
}
|
||||
val A.Companion.boo: String
|
||||
get() = "1"
|
||||
fun A.Companion.boo(): String =""
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.boo
|
||||
|
||||
fun case1() {
|
||||
val y1 =<!UNRESOLVED_REFERENCE!>1::boo<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
val Int.boo: String
|
||||
get() = "1"
|
||||
fun Int.boo(): String =""
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase2
|
||||
import libCase2.*
|
||||
|
||||
fun case2() {
|
||||
val y1 =<!UNRESOLVED_REFERENCE!>1::boo<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase2.kt
|
||||
package libCase2
|
||||
|
||||
val Int.boo: String
|
||||
get() = "1"
|
||||
fun Int.boo(): String =""
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-409
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 1 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 3
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 4
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 5
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 5 -> sentence 1
|
||||
* NUMBER: 4
|
||||
* DESCRIPTION: the case of a call with a callable reference as a not parameter
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.boo
|
||||
|
||||
fun case1() {
|
||||
val y1 =1::<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
val Int.boo: String
|
||||
get() = "1"
|
||||
fun Int.boo(): String =""
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase2
|
||||
import libCase2.*
|
||||
|
||||
fun case2() {
|
||||
val y1 =1::<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase2.kt
|
||||
package libCase2
|
||||
|
||||
val Int.boo: String
|
||||
get() = "1"
|
||||
fun Int.boo(): String =""
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.boo
|
||||
|
||||
fun case1() {
|
||||
val y1 =<!UNRESOLVED_REFERENCE!>::boo<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
val boo: String
|
||||
get() = "1"
|
||||
fun boo(): String =""
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase2
|
||||
import libCase2.*
|
||||
|
||||
fun case2() {
|
||||
val y1 =<!UNRESOLVED_REFERENCE!>::boo<!>
|
||||
}
|
||||
|
||||
val boo: String
|
||||
get() = "1"
|
||||
fun boo(): String =""
|
||||
|
||||
// FILE: LibCase2.kt
|
||||
package libCase2
|
||||
|
||||
fun boo(): String =""
|
||||
|
||||
|
||||
// FILE: TestCase3.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase3
|
||||
import libCase3.*
|
||||
|
||||
fun case3() {
|
||||
val y1 =<!UNRESOLVED_REFERENCE!>::boo<!>
|
||||
}
|
||||
|
||||
val boo: String
|
||||
get() = "1"
|
||||
fun boo(): String =""
|
||||
|
||||
// FILE: LibCase3.kt
|
||||
package libCase3
|
||||
|
||||
val boo: String
|
||||
get() = "1"
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-409
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 1 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 3
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 4
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 5
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 5 -> sentence 1
|
||||
* NUMBER: 5
|
||||
* DESCRIPTION: the case of a call with a callable reference as a not parameter
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.boo
|
||||
|
||||
fun case1() {
|
||||
val y1 =::<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
val boo: String
|
||||
get() = "1"
|
||||
fun boo(): String =""
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase2
|
||||
import libCase2.*
|
||||
|
||||
fun case2() {
|
||||
val y1 =::<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>
|
||||
}
|
||||
|
||||
val boo: String
|
||||
get() = "1"
|
||||
fun boo(): String =""
|
||||
|
||||
// FILE: LibCase2.kt
|
||||
package libCase2
|
||||
|
||||
fun boo(): String =""
|
||||
|
||||
|
||||
// FILE: TestCase3.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase3
|
||||
import libCase3.*
|
||||
|
||||
fun case3() {
|
||||
val y1 =::<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>
|
||||
}
|
||||
|
||||
val boo: String
|
||||
get() = "1"
|
||||
fun boo(): String =""
|
||||
|
||||
// FILE: LibCase3.kt
|
||||
package libCase3
|
||||
|
||||
val boo: String
|
||||
get() = "1"
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
|
||||
fun foo(i: Int): Int = 2 // (1)
|
||||
fun foo(d: Double): Double = 2.0 // (2)
|
||||
|
||||
fun case1() {
|
||||
val x1: (Int) -> Int = ::foo
|
||||
val x2: (Int) -> Int = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.Int, kotlin.Int>")!>::foo<!>
|
||||
|
||||
val y1: (Double) -> Double = ::foo
|
||||
val y2: (Double) -> Double = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.Double, kotlin.Double>")!>::foo<!>
|
||||
}
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
*/
|
||||
package testPackCase2
|
||||
|
||||
val foo = 4
|
||||
val boo = 4.0
|
||||
fun case2() {
|
||||
val y2 : () ->Int =::foo
|
||||
val y1 : () ->Int =<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.Int>")!>::foo<!>
|
||||
|
||||
val x1 : () ->Any =::boo
|
||||
val x2 : () ->Any =<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.Double>")!>::boo<!>
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
// !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-413
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 1 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 5 -> sentence 1
|
||||
* SECONDARY LINKS: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 6 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: the case of a call with a callable reference as a not parameter
|
||||
*/
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
|
||||
fun foo(i: Int): Int = 2 // (1)
|
||||
fun foo(d: Double): Double = 2.0 // (2)
|
||||
|
||||
fun case1() {
|
||||
val x1: (Int) -> Int = ::<!DEBUG_INFO_CALL("fqName: testsCase1.foo; typeCall: function")!>foo<!>
|
||||
val x2: (Int) -> Int = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.Int, kotlin.Int>")!>::foo<!>
|
||||
|
||||
val y1: (Double) -> Double = ::<!DEBUG_INFO_CALL("fqName: testsCase1.foo; typeCall: function")!>foo<!>
|
||||
val y2: (Double) -> Double = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.Double, kotlin.Double>")!>::foo<!>
|
||||
}
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
*/
|
||||
package testPackCase2
|
||||
|
||||
val foo = 4
|
||||
val boo = 4.0
|
||||
fun case2() {
|
||||
val y2 : () ->Int =::<!DEBUG_INFO_CALL("fqName: testPackCase2.foo; typeCall: variable")!>foo<!>
|
||||
val y1 : () ->Int =<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.Int>")!>::foo<!>
|
||||
|
||||
val x1 : () ->Any =::<!DEBUG_INFO_CALL("fqName: testPackCase2.boo; typeCall: variable")!>boo<!>
|
||||
val x2 : () ->Any =<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.Double>")!>::boo<!>
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.*
|
||||
import kotlin.text.format
|
||||
|
||||
fun case1() {
|
||||
val y2 : () ->String =(String)::format
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase2
|
||||
import libCase2.*
|
||||
import kotlin.text.format
|
||||
|
||||
fun case2() {
|
||||
//
|
||||
val x = "".format::invoke
|
||||
//
|
||||
val y = String.format::invoke
|
||||
}
|
||||
|
||||
fun String.invoke(format: String, vararg args: Any?): String = "" //(2)
|
||||
|
||||
val String.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
// FILE: LibCase2.kt
|
||||
package libCase2
|
||||
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
fun String.invoke(format: String, vararg args: Any?): String = ""
|
||||
|
||||
|
||||
val String.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase3.kt
|
||||
// TESTCASE NUMBER: 3
|
||||
package testsCase3
|
||||
import libCase3.format
|
||||
import kotlin.text.*
|
||||
|
||||
fun case3() {
|
||||
val y1 =(String)::format
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty1<kotlin.String, kotlin.Int>")!>y1<!>
|
||||
|
||||
val y2 =""::format
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.Int>")!>y2<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase3.kt
|
||||
package libCase3
|
||||
|
||||
val String.Companion.format: Unit
|
||||
get() = TODO()
|
||||
|
||||
val String.format: Int
|
||||
get() = TODO()
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
// !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-409
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 1 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 3
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 4
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 6
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: the case of a call with a callable reference as a not parameter
|
||||
*/
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
import libCase1.*
|
||||
import kotlin.text.format
|
||||
|
||||
fun case1() {
|
||||
val y2 : () ->String =(String)::<!DEBUG_INFO_CALL("fqName: libCase1.format; typeCall: variable")!>format<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
package libCase1
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
// FILE: TestCase2.kt
|
||||
// TESTCASE NUMBER: 2
|
||||
package testsCase2
|
||||
import libCase2.*
|
||||
import kotlin.text.format
|
||||
|
||||
fun case2() {
|
||||
//
|
||||
val x = "".format::<!DEBUG_INFO_CALL("fqName: testsCase2.invoke; typeCall: extension function")!>invoke<!>
|
||||
//
|
||||
val y = String.format::<!DEBUG_INFO_CALL("fqName: testsCase2.invoke; typeCall: extension function")!>invoke<!>
|
||||
}
|
||||
|
||||
fun String.invoke(format: String, vararg args: Any?): String = "" //(2)
|
||||
|
||||
val String.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
// FILE: LibCase2.kt
|
||||
package libCase2
|
||||
|
||||
|
||||
val String.Companion.format: String
|
||||
get() = "1"
|
||||
|
||||
fun String.invoke(format: String, vararg args: Any?): String = ""
|
||||
|
||||
|
||||
val String.format: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase3.kt
|
||||
// TESTCASE NUMBER: 3
|
||||
package testsCase3
|
||||
import libCase3.format
|
||||
import kotlin.text.*
|
||||
|
||||
fun case3() {
|
||||
val y1 =(String)::<!DEBUG_INFO_CALL("fqName: libCase3.format; typeCall: variable")!>format<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.Unit>")!>y1<!>
|
||||
|
||||
val y2 =""::<!DEBUG_INFO_CALL("fqName: libCase3.format; typeCall: variable")!>format<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KProperty0<kotlin.Int>")!>y2<!>
|
||||
}
|
||||
|
||||
// FILE: LibCase3.kt
|
||||
package libCase3
|
||||
|
||||
val String.Companion.format: Unit
|
||||
get() = TODO()
|
||||
|
||||
val String.format: Int
|
||||
get() = TODO()
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
|
||||
class Case() {
|
||||
fun case(v: V) {
|
||||
val va: () -> String = (V)::a
|
||||
|
||||
val vb: () -> String = (V)::b
|
||||
|
||||
val va1: () -> String = v::a
|
||||
val vb1: () -> String = (V)::b
|
||||
|
||||
}
|
||||
|
||||
val V.Companion.b: String // (3)
|
||||
get() = "1"
|
||||
|
||||
}
|
||||
|
||||
val V.a: String
|
||||
get() = "1"
|
||||
|
||||
val V.Companion.a: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
class V {
|
||||
companion object {
|
||||
const val b: String = "1"
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
// !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-409
|
||||
* MAIN LINK: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 1 -> sentence 1
|
||||
* PRIMARY LINKS: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 2
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 3
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 4
|
||||
* overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 2 -> sentence 6
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION: the case of a call with a callable reference as a not parameter
|
||||
*/
|
||||
|
||||
|
||||
// FILE: TestCase1.kt
|
||||
// TESTCASE NUMBER: 1
|
||||
package testsCase1
|
||||
|
||||
class Case() {
|
||||
fun case(v: V) {
|
||||
val va: () -> String = (V)::<!DEBUG_INFO_CALL("fqName: testsCase1.a; typeCall: variable")!>a<!>
|
||||
|
||||
val vb: () -> String = (V)::<!DEBUG_INFO_CALL("fqName: testsCase1.V.Companion.b; typeCall: variable")!>b<!>
|
||||
|
||||
val va1: () -> String = v::<!DEBUG_INFO_CALL("fqName: testsCase1.a; typeCall: variable")!>a<!>
|
||||
val vb1: () -> String = (V)::<!DEBUG_INFO_CALL("fqName: testsCase1.V.Companion.b; typeCall: variable")!>b<!>
|
||||
|
||||
}
|
||||
|
||||
val V.Companion.<!EXTENSION_SHADOWED_BY_MEMBER!>b<!>: String // (3)
|
||||
get() = "1"
|
||||
|
||||
}
|
||||
|
||||
val V.a: String
|
||||
get() = "1"
|
||||
|
||||
val V.Companion.a: String
|
||||
get() = "1"
|
||||
|
||||
|
||||
class V {
|
||||
companion object {
|
||||
const val b: String = "1"
|
||||
}
|
||||
}
|
||||
+362
@@ -0,0 +1,362 @@
|
||||
{
|
||||
"5": {
|
||||
"neg": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 3,
|
||||
"description": "a callable reference is itself an argument to an overloaded function call",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.5.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pos": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"1": {
|
||||
"neg": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.5.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pos": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 3,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
"neg": {
|
||||
"2": [
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.5.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
],
|
||||
"3": [
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.5.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
],
|
||||
"4": [
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.5.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
],
|
||||
"5": [
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.4.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.5.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pos": {
|
||||
"2": [
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 3,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
],
|
||||
"3": [
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 3,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
],
|
||||
"4": [
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 3,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
],
|
||||
"6": [
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 3,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.2.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
},
|
||||
{
|
||||
"specVersion": "0.1-409",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.3.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "primary"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"6": {
|
||||
"pos": {
|
||||
"1": [
|
||||
{
|
||||
"specVersion": "0.1-413",
|
||||
"casesNumber": 2,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "secondary"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"2": {
|
||||
"pos": {
|
||||
"2": [
|
||||
{
|
||||
"specVersion": "0.1-401",
|
||||
"casesNumber": 1,
|
||||
"description": "the case of a call with a callable reference as a not parameter",
|
||||
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2/pos/2.1.kt",
|
||||
"unexpectedBehaviour": false,
|
||||
"linkType": "main"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+318
@@ -3420,6 +3420,50 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Call_with_an_explicit_type_receiver extends AbstractDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCall_with_an_explicit_type_receiver() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_3 extends AbstractDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_3() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3/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-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3/pos/2.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-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@@ -3490,6 +3534,11 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/3.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("3.2.kt")
|
||||
public void test3_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/3.2.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-with-an-explicit-receiver/p-6/pos/4.1.kt");
|
||||
@@ -3505,6 +3554,11 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/5.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("5.2.kt")
|
||||
public void test5_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/5.2.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-with-an-explicit-receiver/p-6/pos/6.1.kt");
|
||||
@@ -3871,6 +3925,16 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
|
||||
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");
|
||||
}
|
||||
|
||||
@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/neg/6.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("6.4.kt")
|
||||
public void test6_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/6.4.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$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
@@ -3924,6 +3988,16 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
|
||||
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("6.2.kt")
|
||||
public void test6_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/6.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("6.3.kt")
|
||||
public void test6_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/6.3.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");
|
||||
@@ -4684,6 +4758,250 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Resolving_callable_references extends AbstractDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInResolving_callable_references() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Bidirectional_resolution_for_callable_calls extends AbstractDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBidirectional_resolution_for_callable_calls() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_1 extends AbstractDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_1() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/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("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos/1.1.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_3 extends AbstractDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_3() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/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("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg/1.1.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/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("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.2.kt")
|
||||
public void test1_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.3.kt")
|
||||
public void test1_3() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.4.kt")
|
||||
public void test1_4() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.4.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_2 extends AbstractDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_2() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2/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/resolving-callable-references/p-2/pos/2.1.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Resolving_callable_references_not_used_as_arguments_to_a_call extends AbstractDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInResolving_callable_references_not_used_as_arguments_to_a_call() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_1 extends AbstractDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_1() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/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("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.2.kt")
|
||||
public void test1_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.3.kt")
|
||||
public void test1_3() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.4.kt")
|
||||
public void test1_4() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.4.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.5.kt")
|
||||
public void test1_5() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.5.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/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("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.2.kt")
|
||||
public void test1_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.3.kt")
|
||||
public void test1_3() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.3.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements")
|
||||
|
||||
Generated
+318
@@ -3420,6 +3420,50 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Call_with_an_explicit_type_receiver extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCall_with_an_explicit_type_receiver() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_3 extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_3() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3/pos")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Pos extends AbstractFirDiagnosticsTestSpec {
|
||||
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-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3/pos/2.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-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@@ -3490,6 +3534,11 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/3.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("3.2.kt")
|
||||
public void test3_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/3.2.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-with-an-explicit-receiver/p-6/pos/4.1.kt");
|
||||
@@ -3505,6 +3554,11 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/5.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("5.2.kt")
|
||||
public void test5_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos/5.2.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-with-an-explicit-receiver/p-6/pos/6.1.kt");
|
||||
@@ -3871,6 +3925,16 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
|
||||
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");
|
||||
}
|
||||
|
||||
@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/neg/6.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("6.4.kt")
|
||||
public void test6_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/6.4.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$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
@@ -3924,6 +3988,16 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
|
||||
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("6.2.kt")
|
||||
public void test6_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/6.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("6.3.kt")
|
||||
public void test6_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/6.3.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");
|
||||
@@ -4684,6 +4758,250 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Resolving_callable_references extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInResolving_callable_references() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Bidirectional_resolution_for_callable_calls extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBidirectional_resolution_for_callable_calls() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_1 extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_1() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Pos extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos/1.1.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_3 extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_3() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Neg extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg/1.1.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Pos extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.2.kt")
|
||||
public void test1_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.3.kt")
|
||||
public void test1_3() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.4.kt")
|
||||
public void test1_4() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos/1.4.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_2 extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_2() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2/pos")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Pos extends AbstractFirDiagnosticsTestSpec {
|
||||
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/resolving-callable-references/p-2/pos/2.1.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Resolving_callable_references_not_used_as_arguments_to_a_call extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInResolving_callable_references_not_used_as_arguments_to_a_call() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_1 extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_1() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Neg extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.2.kt")
|
||||
public void test1_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.3.kt")
|
||||
public void test1_3() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.4.kt")
|
||||
public void test1_4() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.4.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.5.kt")
|
||||
public void test1_5() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.5.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Pos extends AbstractFirDiagnosticsTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.2.kt")
|
||||
public void test1_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.3.kt")
|
||||
public void test1_3() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos/1.3.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements")
|
||||
|
||||
Reference in New Issue
Block a user