[Spec tests] Add tests for Algorithm of MSC selection

This commit is contained in:
anastasiia.spaseeva
2020-07-28 11:13:45 +03:00
parent 73850e97d7
commit cfbfec77a5
73 changed files with 6031 additions and 4 deletions
@@ -0,0 +1,27 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-366
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) <:Widen(Y_k) is built
*/
var flag = false
fun box(): String {
Case(1, 1)
if (flag) {
return "OK"
}else
return "NOK"
}
class Case {
constructor(y: Int, x: Number){
flag = false
}
constructor(vararg x: Int){
flag = true
}
}
@@ -0,0 +1,25 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-366
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) <:Widen(Y_k) is built
*/
var flag = false
fun box(): String {
Case(1, 1)
if (flag) {
return "OK"
}else
return "NOK"
}
class Case (val y: Int, val x: Number) {
constructor(vararg x: Int) : this(1, 1 as Number){
flag = true
}
}
@@ -0,0 +1,24 @@
{
"3": {
"pos": {
"1": [
{
"specVersion": "0.1-366",
"casesNumber": 0,
"description": "If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) \u003c:Widen(Y_k) is built",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-366",
"casesNumber": 0,
"description": "If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) \u003c:Widen(Y_k) is built",
"path": "compiler/tests-spec/testData/codegen/box/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"
}
]
}
}
}
@@ -0,0 +1,122 @@
{
"3": {
"pos": {
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 11,
"description": "call with explicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "infix call: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with implicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "infix call (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "call with explicit receiver",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.5.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with explicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "The candidate having any variable-argument parameters is less specific",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/5.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with implicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.3.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
],
"2": [
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "prefer kotlin.Short to kotlin.Byte.",
"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.3.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
]
}
}
}
@@ -0,0 +1,31 @@
// !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 testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
class Case2() : I2, I1{
fun test(){
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1)<!>
<!DEBUG_INFO_CALL("fqName: testPackCase1.I1.Companion.foo; typeCall: function")!>foo(1)<!>
}
}
interface I2{
companion object {
fun <T>foo(x: Int): Unit = print(1) // (1)
}
}
interface I1{
companion object {
fun foo(x: Int): String = "print(2)" // (2)
}
}
@@ -0,0 +1,40 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 1
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 3
* NUMBER: 1
* DESCRIPTION: Both candidates are more applicable and one of them is non-parameterized
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
class Case2() : I2, I1{
fun test(){
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1)<!>
<!DEBUG_INFO_CALL("fqName: testPackCase1.I1.Companion.foo; typeCall: function")!>foo(1)<!>
}
}
interface I2{
companion object {
fun <T>foo(x: Int): Unit = print(1) // (1)
}
}
interface I1{
companion object {
fun foo(x: Int): String = "print(2)" // (2)
}
}
@@ -0,0 +1,43 @@
// !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 testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
class Case2() : I2, I1, I3 {
fun test() {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1)<!> // resolved to (2)
<!DEBUG_INFO_CALL("fqName: testPackCase1.I1.Companion.foo; typeCall: function")!>foo(1)<!>
}
}
interface I2 {
companion object {
fun <T> foo(x: Int): Unit = print(1) // (1)
}
}
interface I1 {
companion object {
fun foo(x: Int): String = "print(2)" // (2)
}
}
interface I3 {
companion object {
fun foo(x: Short): Unit = print(3) // (3)
}
}
interface I4 {
companion object {
fun foo(x: Any): Unit = print(4) // (4)
}
}
@@ -0,0 +1,52 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 1
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 3
* NUMBER: 2
* DESCRIPTION: Both candidates are more applicable and few of them are non-parameterized
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
class Case2() : I2, I1, I3 {
fun test() {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1)<!> // resolved to (2)
<!DEBUG_INFO_CALL("fqName: testPackCase1.I1.Companion.foo; typeCall: function")!>foo(1)<!>
}
}
interface I2 {
companion object {
fun <T> foo(x: Int): Unit = print(1) // (1)
}
}
interface I1 {
companion object {
fun foo(x: Int): String = "print(2)" // (2)
}
}
interface I3 {
companion object {
fun foo(x: Short): Unit = print(3) // (3)
}
}
interface I4 {
companion object {
fun foo(x: Any): Unit = print(4) // (4)
}
}
@@ -0,0 +1,99 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1
fun case1(case: Case1) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
case.boo(1)
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(x=1)<!>
//(1.1) return type is String
case.boo(x=1)
}
fun Case1.boo(x: Int, y: Any= ""): String = TODO() //(1.1)
fun Case1.boo(x: Int, y: Any= "", z: Any = 1): Unit = TODO() //(1.1)
fun Case1.boo(x: Long, y: Any= ""): Unit = TODO() //(1.1)
fun Case1.boo(x: Long, y: Any= "", z: Any = 1): Unit = TODO() //(1.1)
fun Case1.boo(x: Short, y: Any= ""): Unit = TODO() //(1.1)
fun Case1.boo(x: Short, y: Any= "", z: Any = 1): Unit = TODO() //(1.1)
fun Case1.boo(x: Byte, y: Any= ""): Unit = TODO() //(1.1)
fun Case1.boo(x: Byte, y: Any= "", z: Any = 1): Unit = TODO() //(1.1)
// TESTCASE NUMBER: 2
class Case2{
fun boo(x: Int, y: Int, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Int, y: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Long, y: Int, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Long, y: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Short, y: Int, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Short, y: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Byte, y: Int, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Byte, y: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
}
fun case2(case: Case2) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
case.boo(1, 2)
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(x=1, y=2)<!>
//(1.1) return type is String
case.boo(x=1, y=2)
}
// TESTCASE NUMBER: 3
class Case3{
fun boo(x: Int, y: Int, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Int, y: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Int, y: Short, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Int, y: Short, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
}
fun case3(case: Case3) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
case.boo(1, 2)
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(x=1, y=2)<!>
//(1.1) return type is String
case.boo(x=1, y=2)
}
// TESTCASE NUMBER: 4
class Case4{
operator fun get(x: Int, a: Any= ""): String = TODO() //(1.1)
operator fun get(x: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
operator fun get(x: Long, a: Any= ""): Unit = TODO() //(1.2)
operator fun get(x: Long, a: Any= "", b: Any = 1): Unit = TODO() //(1.2)
operator fun get(x: Short, a: Any= "", b: Any = 1): Unit = TODO() //(1.3)
operator fun get(x: Short, a: Any= ""): Unit = TODO() //(1.3)
operator fun get(x: Byte, a: Any= "", b: Any = 1): Unit = TODO() //(1.4)
operator fun get(x: Byte, a: Any= ""): Unit = TODO() //(1.4)
}
fun case4(case: Case4) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case4.get; typeCall: operator function")!>get(1)<!>
//(1.1) return type is String
case.get(1)
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case4.get; typeCall: operator function")!>get(x=1)<!>
//(1.1) return type is String
case.get(x=1)
//as operator call case + 1
//to (1.1)
case[1]
//(1.1) return type is String
case[1]
}
@@ -0,0 +1,111 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* PRIMARY 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 3
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: call with explicit receiver: different built-in integer types and one of them is kotlin.Int
*/
// TESTCASE NUMBER: 1
class Case1
fun case1(case: Case1) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(1)<!>
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(x=1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(x=1)<!>
}
fun Case1.boo(x: Int, y: Any= ""): String = TODO() //(1.1)
fun Case1.boo(x: Int, y: Any= "", z: Any = 1): Unit = TODO() //(1.1)
fun Case1.boo(x: Long, y: Any= ""): Unit = TODO() //(1.1)
fun Case1.boo(x: Long, y: Any= "", z: Any = 1): Unit = TODO() //(1.1)
fun Case1.boo(x: Short, y: Any= ""): Unit = TODO() //(1.1)
fun Case1.boo(x: Short, y: Any= "", z: Any = 1): Unit = TODO() //(1.1)
fun Case1.boo(x: Byte, y: Any= ""): Unit = TODO() //(1.1)
fun Case1.boo(x: Byte, y: Any= "", z: Any = 1): Unit = TODO() //(1.1)
// TESTCASE NUMBER: 2
class Case2{
fun boo(x: Int, y: Int, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Int, y: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Long, y: Int, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Long, y: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Short, y: Int, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Short, y: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Byte, y: Int, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Byte, y: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
}
fun case2(case: Case2) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(1, 2)<!>
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(x=1, y=2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(x=1, y=2)<!>
}
// TESTCASE NUMBER: 3
class Case3{
fun boo(x: Int, y: Int, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Int, y: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Int, y: Short, a: Any= ""): String = TODO() //(1.1)
fun boo(x: Int, y: Short, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
}
fun case3(case: Case3) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(1, 2)<!>
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(x=1, y=2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(x=1, y=2)<!>
}
// TESTCASE NUMBER: 4
class Case4{
operator fun get(x: Int, a: Any= ""): String = TODO() //(1.1)
operator fun get(x: Int, a: Any= "", b: Any = 1): Unit = TODO() //(1.1)
operator fun get(x: Long, a: Any= ""): Unit = TODO() //(1.2)
operator fun get(x: Long, a: Any= "", b: Any = 1): Unit = TODO() //(1.2)
operator fun get(x: Short, a: Any= "", b: Any = 1): Unit = TODO() //(1.3)
operator fun get(x: Short, a: Any= ""): Unit = TODO() //(1.3)
operator fun get(x: Byte, a: Any= "", b: Any = 1): Unit = TODO() //(1.4)
operator fun get(x: Byte, a: Any= ""): Unit = TODO() //(1.4)
}
fun case4(case: Case4) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case4.get; typeCall: operator function")!>get(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.get(1)<!>
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case4.get; typeCall: operator function")!>get(x=1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.get(x=1)<!>
//as operator call case + 1
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case4.get; typeCall: operator function")!>case[1]<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case[1]<!>
}
@@ -0,0 +1,121 @@
// !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 testPackCase1
fun case1() {
//to (1.1)
1.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
1.boo(1)
//to (1.1)
1.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
1.boo(x = 1)
}
private fun Int.boo(x: Int, a: Any = ""): String = TODO() //(1.1)
private fun Int.boo(x: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
private fun Long.boo(x: Long, a: Any = ""): Unit = TODO() //(1.2)
private fun Long.boo(x: Long, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
private fun Short.boo(x: Short, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
private fun Short.boo(x: Short, a: Any = ""): Unit = TODO() //(1.3)
private fun Byte.boo(x: Byte, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
private fun Byte.boo(x: Byte, a: Any = ""): Unit = TODO() //(1.4)
// FILE: TestCase1.kt
// TESTCASE NUMBER: 2
package testPackCase2
import testPackCase2.Case2.Companion.boo
class Case2 {
val boo: Int = 1
companion object {
fun Int.boo(x: Int, y: Int, a: Any = ""): String = TODO() //(1.1)
fun Int.boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
fun Long.boo(x: Long, y: Int, a: Any = ""): Unit = TODO() //(1.2)
fun Long.boo(x: Long, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
fun Short.boo(x: Short, y: Int, a: Any = ""): Unit = TODO() //(1.3)
fun Short.boo(x: Short, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
fun Byte.boo(x: Byte, y: Int, a: Any = ""): Unit = TODO() //(1.4)
fun Byte.boo(x: Byte, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
}
fun case() {
1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!>
1.boo(1, 1)
}
}
fun case2(case: Case2) {
//to (1.1)
case.boo.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 2)<!>
//(1.1) return type is String
case.boo.boo(1, 2)
//to (1.1)
case.boo.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
case.boo.boo(x = 1, y = 2)
case.apply { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.apply { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.let { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.let { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.also { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.also { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.run { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.run { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
}
// FILE: TestCase1.kt
// TESTCASE NUMBER: 3
package testPackCase3
import testPackCase3.Case3.Companion.get
class Case3 {
val boo: Int = 1
companion object {
operator fun Int.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
operator fun Int.get(x: String, a: Any = ""): String = TODO() //(1.1)
operator fun Long.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
operator fun Long.get(x: String, a: Any = ""): Unit = TODO() //(1.2)
operator fun Short.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
operator fun Short.get(x: String, a: Any = ""): Unit = TODO() //(1.3)
operator fun Byte.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
operator fun Byte.get(x: String, a: Any = "" ): Unit = TODO() //(1.4)
}
fun case() {
1["1"]
1["1"]
}
}
fun case3(case: Case3) {
//to (1.1)
case.boo["1"]
//(1.1) return type is String
case.boo["1"]
case.apply { 1["1"] }
case.apply { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1["1"]<!> }
case.let { 1["1"] }
case.let { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1["1"]<!> }
case.also { 1["1"] }
case.also { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1["1"]<!> }
case.run { 1["1"] }
case.run { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1["1"]<!> }
}
@@ -0,0 +1,133 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* PRIMARY 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 3
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
fun case1() {
//to (1.1)
1.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1)<!>
//to (1.1)
1.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(x = 1)<!>
}
private fun Int.boo(x: Int, a: Any = ""): String = TODO() //(1.1)
private fun Int.boo(x: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
private fun Long.boo(x: Long, a: Any = ""): Unit = TODO() //(1.2)
private fun Long.boo(x: Long, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
private fun Short.boo(x: Short, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
private fun Short.boo(x: Short, a: Any = ""): Unit = TODO() //(1.3)
private fun Byte.boo(x: Byte, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
private fun Byte.boo(x: Byte, a: Any = ""): Unit = TODO() //(1.4)
// FILE: TestCase1.kt
// TESTCASE NUMBER: 2
package testPackCase2
import testPackCase2.Case2.Companion.boo
class Case2 {
val boo: Int = 1
companion object {
fun Int.boo(x: Int, y: Int, a: Any = ""): String = TODO() //(1.1)
fun Int.boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
fun Long.boo(x: Long, y: Int, a: Any = ""): Unit = TODO() //(1.2)
fun Long.boo(x: Long, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
fun Short.boo(x: Short, y: Int, a: Any = ""): Unit = TODO() //(1.3)
fun Short.boo(x: Short, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
fun Byte.boo(x: Byte, y: Int, a: Any = ""): Unit = TODO() //(1.4)
fun Byte.boo(x: Byte, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
}
fun case() {
1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!>
}
}
fun case2(case: Case2) {
//to (1.1)
case.boo.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo.boo(1, 2)<!>
//to (1.1)
case.boo.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo.boo(x = 1, y = 2)<!>
case.apply { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.apply { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.let { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.let { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.also { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.also { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.run { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.run { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
}
// FILE: TestCase1.kt
// TESTCASE NUMBER: 3
package testPackCase3
import testPackCase3.Case3.Companion.get
class Case3 {
val boo: Int = 1
companion object {
operator fun Int.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
operator fun Int.get(x: String, a: Any = ""): String = TODO() //(1.1)
operator fun Long.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
operator fun Long.get(x: String, a: Any = ""): Unit = TODO() //(1.2)
operator fun Short.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
operator fun Short.get(x: String, a: Any = ""): Unit = TODO() //(1.3)
operator fun Byte.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
operator fun Byte.get(x: String, a: Any = "" ): Unit = TODO() //(1.4)
}
fun case() {
<!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.get; typeCall: operator extension function")!>1["1"]<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1["1"]<!>
}
}
fun case3(case: Case3) {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.get; typeCall: operator extension function")!>case.boo["1"]<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo["1"]<!>
case.apply { <!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.get; typeCall: operator extension function")!>1["1"]<!> }
case.apply { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1["1"]<!> }
case.let { <!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.get; typeCall: operator extension function")!>1["1"]<!> }
case.let { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1["1"]<!> }
case.also { <!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.get; typeCall: operator extension function")!>1["1"]<!> }
case.also { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1["1"]<!> }
case.run { <!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.get; typeCall: operator extension function")!>1["1"]<!> }
case.run { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1["1"]<!> }
}
@@ -0,0 +1,101 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1
fun case1(case: Case1) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1)<!>
}
}
fun Case1.boo(x: Int, a: Any = ""): String = TODO() //(1.1)
fun Case1.boo(x: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
fun Case1.boo(x: Long, a: Any = ""): Unit = TODO() //(1.2)
fun Case1.boo(x: Long, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
fun Case1.boo(x: Short, a: Any = ""): Unit = TODO() //(1.3)
fun Case1.boo(x: Short, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
fun Case1.boo(x: Byte, a: Any = ""): Unit = TODO() //(1.4)
fun Case1.boo(x: Byte, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
// TESTCASE NUMBER: 2
class Case2 {
fun boo(x: Int, y: Int, a: Any = ""): String = TODO() //(1.1)
fun boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Long, y: Int, a: Any = ""): Unit = TODO() //(1.2)
fun boo(x: Long, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
fun boo(x: Short, y: Int, a: Any = ""): Unit = TODO() //(1.3)
fun boo(x: Short, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
fun boo(x: Byte, y: Int, a: Any = ""): Unit = TODO() //(1.4)
fun boo(x: Byte, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
}
fun case2(case: Case2) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
// TESTCASE NUMBER: 3
class Case3 {
fun boo(x: Int, y: Int, a: Any = ""): String = TODO() //(1.1)
fun boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Int, y: Short, a: Any = ""): Unit = TODO() //(1.2)
fun boo(x: Int, y: Short, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
}
fun case3(case: Case3) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
// TESTCASE NUMBER: 4
class Case4 {
operator fun get(x: Int, a: Any = ""): String = TODO() //(1.1)
operator fun get(x: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
operator fun get(x: Long, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
operator fun get(x: Long, a: Any = ""): Unit = TODO() //(1.2)
operator fun get(x: Short, a: Any = ""): Unit = TODO() //(1.3)
operator fun get(x: Short, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
operator fun get(x: Byte, a: Any = ""): Unit = TODO() //(1.4)
operator fun get(x: Byte, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
}
fun case4(case: Case4) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case4.get; typeCall: operator function")!>get(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>get(1)<!>
//to (1.1)
this [1]
//(1.1) return type is String
this [1]
}
}
@@ -0,0 +1,113 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* PRIMARY 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 3
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 3
* DESCRIPTION: call with implicit receiver: different built-in integer types and one of them is kotlin.Int
*/
// TESTCASE NUMBER: 1
class Case1
fun case1(case: Case1) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1)<!>
}
}
fun Case1.boo(x: Int, a: Any = ""): String = TODO() //(1.1)
fun Case1.boo(x: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
fun Case1.boo(x: Long, a: Any = ""): Unit = TODO() //(1.2)
fun Case1.boo(x: Long, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
fun Case1.boo(x: Short, a: Any = ""): Unit = TODO() //(1.3)
fun Case1.boo(x: Short, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
fun Case1.boo(x: Byte, a: Any = ""): Unit = TODO() //(1.4)
fun Case1.boo(x: Byte, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
// TESTCASE NUMBER: 2
class Case2 {
fun boo(x: Int, y: Int, a: Any = ""): String = TODO() //(1.1)
fun boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Long, y: Int, a: Any = ""): Unit = TODO() //(1.2)
fun boo(x: Long, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
fun boo(x: Short, y: Int, a: Any = ""): Unit = TODO() //(1.3)
fun boo(x: Short, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
fun boo(x: Byte, y: Int, a: Any = ""): Unit = TODO() //(1.4)
fun boo(x: Byte, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
}
fun case2(case: Case2) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
// TESTCASE NUMBER: 3
class Case3 {
fun boo(x: Int, y: Int, a: Any = ""): String = TODO() //(1.1)
fun boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
fun boo(x: Int, y: Short, a: Any = ""): Unit = TODO() //(1.2)
fun boo(x: Int, y: Short, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
}
fun case3(case: Case3) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
// TESTCASE NUMBER: 4
class Case4 {
operator fun get(x: Int, a: Any = ""): String = TODO() //(1.1)
operator fun get(x: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
operator fun get(x: Long, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
operator fun get(x: Long, a: Any = ""): Unit = TODO() //(1.2)
operator fun get(x: Short, a: Any = ""): Unit = TODO() //(1.3)
operator fun get(x: Short, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
operator fun get(x: Byte, a: Any = ""): Unit = TODO() //(1.4)
operator fun get(x: Byte, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
}
fun case4(case: Case4) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case4.get; typeCall: operator function")!>get(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>get(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case4.get; typeCall: operator function")!>this [1]<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this [1]<!>
}
}
@@ -0,0 +1,87 @@
// !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 testPackCase1
private fun Int.boo(x: Int, a: Any = ""): String = TODO() //(1.1)
private fun Int.boo(x: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
private fun Int.boo(x: Long, a: Any = ""): Unit = TODO() //(1.2)
private fun Int.boo(x: Long, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
private fun Int.boo(x: Short, a: Any = ""): Unit = TODO() //(1.3)
private fun Int.boo(x: Short, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
private fun Int.boo(x: Byte, a: Any = ""): Unit = TODO() //(1.4)
private fun Int.boo(x: Byte, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
fun case1() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1)<!>
}
}
// FILE: TestCase2.kt
// TESTCASE NUMBER: 2
package testPackCase2
class Case2 {
private fun Int.boo(x: Int, y: Int, a: Any = ""): String = TODO() //(1.1)
private fun Int.boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
private fun Short.boo(x: Int, y: Int, a: Any = ""): Unit = TODO() //(1.2)
private fun Short.boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
private fun Long.boo(x: Int, y: Int, a: Any = ""): Unit = TODO() //(1.3)
private fun Long.boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
private fun Byte.boo(x: Int, y: Int, a: Any = ""): Unit = TODO() //(1.4)
private fun Byte.boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
fun case2() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.boo; typeCall: extension function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.boo; typeCall: extension function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
}
// FILE: TestCase4.kt
// TESTCASE NUMBER: 4
package testPackCase4
private operator fun Int.get(x: String, a: Any = ""): String = TODO() //(1.1)
private operator fun Int.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
private operator fun Short.get(x: String, a: Any = ""): Unit = TODO() //(1.2)
private operator fun Short.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
private operator fun Byte.get(x: String, a: Any = ""): Unit = TODO() //(1.3)
private operator fun Byte.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
private operator fun Long.get(x: String, a: Any = ""): Unit = TODO() //(1.4)
private operator fun Long.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
fun case4() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase4.get; typeCall: operator extension function")!>get("1")<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>get("1")<!>
//to (1.1)
this["1"]
//(1.1) return type is String
this["1"]
}
}
@@ -0,0 +1,99 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* PRIMARY 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 3
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 4
* DESCRIPTION: call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
private fun Int.boo(x: Int, a: Any = ""): String = TODO() //(1.1)
private fun Int.boo(x: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
private fun Int.boo(x: Long, a: Any = ""): Unit = TODO() //(1.2)
private fun Int.boo(x: Long, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
private fun Int.boo(x: Short, a: Any = ""): Unit = TODO() //(1.3)
private fun Int.boo(x: Short, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
private fun Int.boo(x: Byte, a: Any = ""): Unit = TODO() //(1.4)
private fun Int.boo(x: Byte, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
fun case1() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1)<!>
}
}
// FILE: TestCase2.kt
// TESTCASE NUMBER: 2
package testPackCase2
class Case2 {
private fun Int.boo(x: Int, y: Int, a: Any = ""): String = TODO() //(1.1)
private fun Int.boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
private fun Short.boo(x: Int, y: Int, a: Any = ""): Unit = TODO() //(1.2)
private fun Short.boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
private fun Long.boo(x: Int, y: Int, a: Any = ""): Unit = TODO() //(1.3)
private fun Long.boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
private fun Byte.boo(x: Int, y: Int, a: Any = ""): Unit = TODO() //(1.4)
private fun Byte.boo(x: Int, y: Int, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
fun case2() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.boo; typeCall: extension function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.boo; typeCall: extension function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
}
// FILE: TestCase4.kt
// TESTCASE NUMBER: 4
package testPackCase4
private operator fun Int.get(x: String, a: Any = ""): String = TODO() //(1.1)
private operator fun Int.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.1)
private operator fun Short.get(x: String, a: Any = ""): Unit = TODO() //(1.2)
private operator fun Short.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.2)
private operator fun Byte.get(x: String, a: Any = ""): Unit = TODO() //(1.3)
private operator fun Byte.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.3)
private operator fun Long.get(x: String, a: Any = ""): Unit = TODO() //(1.4)
private operator fun Long.get(x: String, a: Any = "", b: Any = 1): Unit = TODO() //(1.4)
fun case4() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase4.get; typeCall: operator extension function")!>get("1")<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>get("1")<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase4.get; typeCall: operator extension function")!>this["1"]<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this["1"]<!>
}
}
@@ -0,0 +1,16 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 5
class Case5 {
fun <T> List<T>.foo(x: T, y: Int = 1, z: Int = 1) : Unit =TODO()
fun <T> List<T>.foo(x: T, y: Int = 1) : String =TODO()
fun case(list: List<Int>) {
list.<!DEBUG_INFO_CALL("fqName: Case5.foo; typeCall: extension function")!>foo(1)<!>
list.foo(1)
}
}
@@ -0,0 +1,29 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* PRIMARY 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 3
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 3
* NUMBER: 5
* DESCRIPTION: call with explicit receiver
*/
// TESTCASE NUMBER: 5
class Case5 {
fun <T> List<T>.foo(x: T, y: Int = 1, z: Int = 1) : Unit =TODO()
fun <T> List<T>.foo(x: T, y: Int = 1) : String =TODO()
fun case(list: List<Int>) {
list.<!DEBUG_INFO_CALL("fqName: Case5.foo; typeCall: extension function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>list.foo(1)<!>
}
}
@@ -0,0 +1,25 @@
// !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(y: Int, x: Int): String = TODO() // (1.1)
fun foo(vararg x: Int): Unit = TODO() // (1.2)
fun case(){
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1, 1)<!>
}
}
// TESTCASE NUMBER: 2
class Case2() {
fun foo(y: Any?, x: Any?): String = TODO() // (1.1)
fun foo(vararg x: Any?): Unit = TODO() // (1.2)
fun case(){
<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1, 1)<!>
}
}
@@ -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 (POSITIVE)
*
* SPEC VERSION: 0.1-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 5
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 3
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 5
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: The candidate having any variable-argument parameters is less specific
*/
// TESTCASE NUMBER: 1
class Case1() {
fun foo(y: Int, x: Int): String = TODO() // (1.1)
fun foo(vararg x: Int): Unit = TODO() // (1.2)
fun case(){
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1, 1)<!>
}
}
// TESTCASE NUMBER: 2
class Case2() {
fun foo(y: Any?, x: Any?): String = TODO() // (1.1)
fun foo(vararg x: Any?): Unit = TODO() // (1.2)
fun case(){
<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1, 1)<!>
}
}
@@ -0,0 +1,164 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1
fun case1(case: Case1) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
case.boo(1)
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
case.boo(x = 1)
}
fun Case1.boo(x: Int): String = TODO() //(1.1)
fun Case1.boo(x: Long): Unit = TODO() //(1.2)
fun Case1.boo(x: Short): Unit = TODO() //(1.3)
fun Case1.boo(x: Byte): Unit = TODO() //(1.4)
// TESTCASE NUMBER: 2
class Case2 {
fun boo(x: Int, y: Int): String = TODO() //(1.1)
fun boo(x: Long, y: Int): Unit = TODO() //(1.2)
fun boo(x: Short, y: Int): Unit = TODO() //(1.3)
fun boo(x: Byte, y: Int): Unit = TODO() //(1.4)
}
fun case2(case: Case2) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
case.boo(1, 2)
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
case.boo(x = 1, y = 2)
}
// TESTCASE NUMBER: 3
class Case3 {
fun boo(x: Int, y: Int): String = TODO() //(1.1)
fun boo(x: Int, y: Short): Unit = TODO() //(1.2)
}
fun case3(case: Case3) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
case.boo(1, 2)
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
case.boo(x = 1, y = 2)
}
// TESTCASE NUMBER: 4
class Case4 {
operator fun plus(x: Int): String = TODO() //(1.1)
operator fun plus(x: Long): Unit = TODO() //(1.2)
operator fun plus(x: Short): Unit = TODO() //(1.3)
operator fun plus(x: Byte): Unit = TODO() //(1.4)
}
fun case4(case: Case4) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case4.plus; typeCall: operator function")!>plus(1)<!>
//(1.1) return type is String
case.plus(1)
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case4.plus; typeCall: operator function")!>plus(x = 1)<!>
//(1.1) return type is String
case.plus(x = 1)
//as operator call case + 1
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case4.plus; typeCall: operator function")!>case+1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case+1<!>
}
// TESTCASE NUMBER: 5
class Case5 {
fun List<Int>.foo(x: Int = 0): String = TODO()
fun List<Int>.foo(x: Short = 0): Unit = TODO()
fun List<Byte>.foo(x: Byte = 0): Unit = TODO()
fun case(list: List<Int>) {
list.<!DEBUG_INFO_CALL("fqName: Case5.foo; typeCall: extension function")!>foo(1)<!>
list.foo(1)
}
}
// TESTCASE NUMBER: 6
class Case6 {
fun List<Int>.foo(x: Int, y: Int = 1): String = TODO()
fun <T> List<Int>.foo(x: T): Unit = TODO()
fun case(list: List<Int>) {
list.<!DEBUG_INFO_CALL("fqName: Case6.foo; typeCall: extension function")!>foo(1)<!>
list.foo(1)
}
}
// TESTCASE NUMBER: 7
class Case7 {
fun <T> List<T>.foo(x: T, y: Int): String = TODO()
fun <T> List<T>.foo(x: T, y: Short): Unit = TODO()
fun case(list: List<Short>) {
list.<!DEBUG_INFO_CALL("fqName: Case7.foo; typeCall: extension function")!>foo(1, 1)<!>
list.foo(1, 1)
}
}
// TESTCASE NUMBER: 8
class Case8() {
fun foo(x: Int, y: Number?): Unit = TODO() // (1)
fun foo(vararg x: Int): String = TODO()//(2)
}
fun testcase8(case: Case8) {
case.<!DEBUG_INFO_CALL("fqName: Case8.foo; typeCall: function")!>foo(1, 1)<!>
case.foo(1, 1)
}
// TESTCASE NUMBER: 9
class Case9() {
fun xoo(y: Int, x: Byte): Unit = TODO() // (2.1)
fun xoo(y: Int, vararg x: Int): String = TODO()// (2.2)
}
fun testcase9(case: Case9) {
case.<!DEBUG_INFO_CALL("fqName: Case9.xoo; typeCall: function")!>xoo(1, 1)<!>
case.xoo(1, 1)
}
// TESTCASE NUMBER: 10
class Case10() {
fun xoo(y: Int, x: Byte): Unit = TODO() // (2.1)
fun xoo(vararg x: Int): String = TODO()// (2.2)
}
fun testcase10(case: Case10) {
case.<!DEBUG_INFO_CALL("fqName: Case10.xoo; typeCall: function")!>xoo(1, 1)<!>
case.<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>xoo(1, 1)<!>
}
// TESTCASE NUMBER: 11
class Case11() {
fun xoo(y: Int, x: Number): Unit = TODO() // (2.1)
fun xoo(vararg x: Int): String = TODO()// (2.2)
}
fun testcase11(case: Case11) {
case.<!DEBUG_INFO_CALL("fqName: Case11.xoo; typeCall: function")!>xoo(1, 1)<!>
case.xoo(1, 1)
}
@@ -0,0 +1,175 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 12 -> sentence 2
* PRIMARY 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 3
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: call with explicit receiver: different built-in integer types and one of them is kotlin.Int
*/
// TESTCASE NUMBER: 1
class Case1
fun case1(case: Case1) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(1)<!>
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(x = 1)<!>
}
fun Case1.boo(x: Int): String = TODO() //(1.1)
fun Case1.boo(x: Long): Unit = TODO() //(1.2)
fun Case1.boo(x: Short): Unit = TODO() //(1.3)
fun Case1.boo(x: Byte): Unit = TODO() //(1.4)
// TESTCASE NUMBER: 2
class Case2 {
fun boo(x: Int, y: Int): String = TODO() //(1.1)
fun boo(x: Long, y: Int): Unit = TODO() //(1.2)
fun boo(x: Short, y: Int): Unit = TODO() //(1.3)
fun boo(x: Byte, y: Int): Unit = TODO() //(1.4)
}
fun case2(case: Case2) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(1, 2)<!>
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(x = 1, y = 2)<!>
}
// TESTCASE NUMBER: 3
class Case3 {
fun boo(x: Int, y: Int): String = TODO() //(1.1)
fun boo(x: Int, y: Short): Unit = TODO() //(1.2)
}
fun case3(case: Case3) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(1, 2)<!>
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(x = 1, y = 2)<!>
}
// TESTCASE NUMBER: 4
class Case4 {
operator fun plus(x: Int): String = TODO() //(1.1)
operator fun plus(x: Long): Unit = TODO() //(1.2)
operator fun plus(x: Short): Unit = TODO() //(1.3)
operator fun plus(x: Byte): Unit = TODO() //(1.4)
}
fun case4(case: Case4) {
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case4.plus; typeCall: operator function")!>plus(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.plus(1)<!>
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case4.plus; typeCall: operator function")!>plus(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.plus(x = 1)<!>
//as operator call case + 1
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case4.plus; typeCall: operator function")!>case+1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case+1<!>
}
// TESTCASE NUMBER: 5
class Case5 {
fun List<Int>.foo(x: Int = 0): String = TODO()
fun List<Int>.foo(x: Short = 0): Unit = TODO()
fun List<Byte>.foo(x: Byte = 0): Unit = TODO()
fun case(list: List<Int>) {
list.<!DEBUG_INFO_CALL("fqName: Case5.foo; typeCall: extension function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>list.foo(1)<!>
}
}
// TESTCASE NUMBER: 6
class Case6 {
fun List<Int>.foo(x: Int, y: Int = 1): String = TODO()
fun <T> List<Int>.foo(x: T): Unit = TODO()
fun case(list: List<Int>) {
list.<!DEBUG_INFO_CALL("fqName: Case6.foo; typeCall: extension function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>list.foo(1)<!>
}
}
// TESTCASE NUMBER: 7
class Case7 {
fun <T> List<T>.foo(x: T, y: Int): String = TODO()
fun <T> List<T>.foo(x: T, y: Short): Unit = TODO()
fun case(list: List<Short>) {
list.<!DEBUG_INFO_CALL("fqName: Case7.foo; typeCall: extension function")!>foo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>list.foo(1, 1)<!>
}
}
// TESTCASE NUMBER: 8
class Case8() {
fun foo(x: Int, y: Number?): Unit = TODO() // (1)
fun foo(vararg x: Int): String = TODO()//(2)
}
fun testcase8(case: Case8) {
case.<!DEBUG_INFO_CALL("fqName: Case8.foo; typeCall: function")!>foo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo(1, 1)<!>
}
// TESTCASE NUMBER: 9
class Case9() {
fun xoo(y: Int, x: Byte): Unit = TODO() // (2.1)
fun xoo(y: Int, vararg x: Int): String = TODO()// (2.2)
}
fun testcase9(case: Case9) {
case.<!DEBUG_INFO_CALL("fqName: Case9.xoo; typeCall: function")!>xoo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.xoo(1, 1)<!>
}
// TESTCASE NUMBER: 10
class Case10() {
fun xoo(y: Int, x: Byte): Unit = TODO() // (2.1)
fun xoo(vararg x: Int): String = TODO()// (2.2)
}
fun testcase10(case: Case10) {
case.<!DEBUG_INFO_CALL("fqName: Case10.xoo; typeCall: function")!>xoo(1, 1)<!>
case.<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>xoo(1, 1)<!>
}
// TESTCASE NUMBER: 11
class Case11() {
fun xoo(y: Int, x: Number): Unit = TODO() // (2.1)
fun xoo(vararg x: Int): String = TODO()// (2.2)
}
fun testcase11(case: Case11) {
case.<!DEBUG_INFO_CALL("fqName: Case11.xoo; typeCall: function")!>xoo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.xoo(1, 1)<!>
}
@@ -0,0 +1,109 @@
// !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 testPackCase1
fun case1() {
//to (1.1)
1.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
1.boo(1)
//to (1.1)
1.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
1.boo(x = 1)
}
private fun Int.boo(x: Int): String = TODO() //(1.1)
private fun Long.boo(x: Long): Unit = TODO() //(1.2)
private fun Short.boo(x: Short): Unit = TODO() //(1.3)
private fun Byte.boo(x: Byte): Unit = TODO() //(1.4)
// FILE: TestCase1.kt
// TESTCASE NUMBER: 2
package testPackCase2
import testPackCase2.Case2.Companion.boo
class Case2 {
val boo: Int = 1
companion object {
fun Int.boo(x: Int, y: Int): String = TODO() //(1.1)
fun Long.boo(x: Long, y: Int): Unit = TODO() //(1.2)
fun Short.boo(x: Short, y: Int): Unit = TODO() //(1.3)
fun Byte.boo(x: Byte, y: Int): Unit = TODO() //(1.4)
}
fun case() {
1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!>
1.boo(1, 1)
}
}
fun case2(case: Case2) {
//to (1.1)
case.boo.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 2)<!>
//(1.1) return type is String
case.boo.boo(1, 2)
//to (1.1)
case.boo.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
case.boo.boo(x = 1, y = 2)
case.apply { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.apply { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.let { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.let { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.also { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.also { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.run { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.run { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
}
// FILE: TestCase1.kt
// TESTCASE NUMBER: 3
package testPackCase3
import testPackCase3.Case3.Companion.plus
class Case3 {
val boo: Int = 1
companion object {
operator fun Int.plus(x: String): String = TODO() //(1.1)
operator fun Long.plus(x: String): Unit = TODO() //(1.2)
operator fun Short.plus(x: String): Unit = TODO() //(1.3)
operator fun Byte.plus(x: String): Unit = TODO() //(1.4)
}
fun case() {
<!DEBUG_INFO_CALL("fqName: <local>.plus; typeCall: function")!>1+"1"<!>
<!DEBUG_INFO_EXPRESSION_TYPE("ILT: 0")!>1+"1"<!>
}
}
fun case3(case: Case3) {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.plus; typeCall: operator extension function")!>case.boo+"1"<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo+"1"<!>
case.apply { <!DEBUG_INFO_CALL("fqName: <local>.plus; typeCall: function")!>1+"1"<!> }
case.apply { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>1+"1"<!> }
case.let { <!DEBUG_INFO_CALL("fqName: <local>.plus; typeCall: function")!>1+"1"<!> }
case.let { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>1+"1"<!> }
case.also { <!DEBUG_INFO_CALL("fqName: <local>.plus; typeCall: function")!>1+"1"<!> }
case.also { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>1+"1"<!> }
case.run { <!DEBUG_INFO_CALL("fqName: <local>.plus; typeCall: function")!>1+"1"<!> }
case.run { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>1+"1"<!> }
}
@@ -0,0 +1,120 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 12 -> sentence 2
* PRIMARY 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 3
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
fun case1() {
//to (1.1)
1.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1)<!>
//to (1.1)
1.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(x = 1)<!>
}
private fun Int.boo(x: Int): String = TODO() //(1.1)
private fun Long.boo(x: Long): Unit = TODO() //(1.2)
private fun Short.boo(x: Short): Unit = TODO() //(1.3)
private fun Byte.boo(x: Byte): Unit = TODO() //(1.4)
// FILE: TestCase1.kt
// TESTCASE NUMBER: 2
package testPackCase2
import testPackCase2.Case2.Companion.boo
class Case2 {
val boo: Int = 1
companion object {
fun Int.boo(x: Int, y: Int): String = TODO() //(1.1)
fun Long.boo(x: Long, y: Int): Unit = TODO() //(1.2)
fun Short.boo(x: Short, y: Int): Unit = TODO() //(1.3)
fun Byte.boo(x: Byte, y: Int): Unit = TODO() //(1.4)
}
fun case() {
1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!>
}
}
fun case2(case: Case2) {
//to (1.1)
case.boo.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo.boo(1, 2)<!>
//to (1.1)
case.boo.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo.boo(x = 1, y = 2)<!>
case.apply { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.apply { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.let { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.let { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.also { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.also { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
case.run { 1.<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.Companion.boo; typeCall: extension function")!>boo(1, 1)<!> }
case.run { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1, 1)<!> }
}
// FILE: TestCase1.kt
// TESTCASE NUMBER: 3
package testPackCase3
import testPackCase3.Case3.Companion.plus
class Case3 {
val boo: Int = 1
companion object {
operator fun Int.plus(x: String): String = TODO() //(1.1)
operator fun Long.plus(x: String): Unit = TODO() //(1.2)
operator fun Short.plus(x: String): Unit = TODO() //(1.3)
operator fun Byte.plus(x: String): Unit = TODO() //(1.4)
}
fun case() {
<!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.plus; typeCall: operator extension function")!>1+"1"<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1+"1"<!>
}
}
fun case3(case: Case3) {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.plus; typeCall: operator extension function")!>case.boo+"1"<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo+"1"<!>
case.apply { <!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.plus; typeCall: operator extension function")!>1+"1"<!> }
case.apply { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1+"1"<!> }
case.let { <!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.plus; typeCall: operator extension function")!>1+"1"<!> }
case.let { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1+"1"<!> }
case.also { <!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.plus; typeCall: operator extension function")!>1+"1"<!> }
case.also { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1+"1"<!> }
case.run { <!DEBUG_INFO_CALL("fqName: testPackCase3.Case3.Companion.plus; typeCall: operator extension function")!>1+"1"<!> }
case.run { <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1+"1"<!> }
}
@@ -0,0 +1,87 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1
fun case1(case: Case1) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1)<!>
}
}
fun Case1.boo(x: Int): String = TODO() //(1.1)
fun Case1.boo(x: Long): Unit = TODO() //(1.2)
fun Case1.boo(x: Short): Unit = TODO() //(1.3)
fun Case1.boo(x: Byte): Unit = TODO() //(1.4)
// TESTCASE NUMBER: 2
class Case2 {
fun boo(x: Int, y: Int): String = TODO() //(1.1)
fun boo(x: Long, y: Int): Unit = TODO() //(1.2)
fun boo(x: Short, y: Int): Unit = TODO() //(1.3)
fun boo(x: Byte, y: Int): Unit = TODO() //(1.4)
}
fun case2(case: Case2) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
// TESTCASE NUMBER: 3
class Case3 {
fun boo(x: Int, y: Int): String = TODO() //(1.1)
fun boo(x: Int, y: Short): Unit = TODO() //(1.2)
}
fun case3(case: Case3) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
// TESTCASE NUMBER: 4
class Case4 {
operator fun minus(x: Int): String = TODO() //(1.1)
operator fun minus(x: Long): Unit = TODO() //(1.2)
operator fun minus(x: Short): Unit = TODO() //(1.3)
operator fun minus(x: Byte): Unit = TODO() //(1.4)
}
fun case4(case: Case4) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case4.minus; typeCall: operator function")!>minus(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>minus(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case4.minus; typeCall: operator function")!>this - 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this - 1<!>
}
}
@@ -0,0 +1,98 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 12 -> sentence 2
* PRIMARY 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 3
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 3
* DESCRIPTION: call with implicit receiver: different built-in integer types and one of them is kotlin.Int
*/
// TESTCASE NUMBER: 1
class Case1
fun case1(case: Case1) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1)<!>
}
}
fun Case1.boo(x: Int): String = TODO() //(1.1)
fun Case1.boo(x: Long): Unit = TODO() //(1.2)
fun Case1.boo(x: Short): Unit = TODO() //(1.3)
fun Case1.boo(x: Byte): Unit = TODO() //(1.4)
// TESTCASE NUMBER: 2
class Case2 {
fun boo(x: Int, y: Int): String = TODO() //(1.1)
fun boo(x: Long, y: Int): Unit = TODO() //(1.2)
fun boo(x: Short, y: Int): Unit = TODO() //(1.3)
fun boo(x: Byte, y: Int): Unit = TODO() //(1.4)
}
fun case2(case: Case2) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case2.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
// TESTCASE NUMBER: 3
class Case3 {
fun boo(x: Int, y: Int): String = TODO() //(1.1)
fun boo(x: Int, y: Short): Unit = TODO() //(1.2)
}
fun case3(case: Case3) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case3.boo; typeCall: function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
// TESTCASE NUMBER: 4
class Case4 {
operator fun minus(x: Int): String = TODO() //(1.1)
operator fun minus(x: Long): Unit = TODO() //(1.2)
operator fun minus(x: Short): Unit = TODO() //(1.3)
operator fun minus(x: Byte): Unit = TODO() //(1.4)
}
fun case4(case: Case4) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case4.minus; typeCall: operator function")!>minus(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>minus(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case4.minus; typeCall: operator function")!>this - 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this - 1<!>
}
}
@@ -0,0 +1,75 @@
// !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 testPackCase1
private fun Int.boo(x: Int): String = TODO() //(1.1)
private fun Int.boo(x: Long): Unit = TODO() //(1.2)
private fun Int.boo(x: Short): Unit = TODO() //(1.3)
private fun Int.boo(x: Byte): Unit = TODO() //(1.4)
fun case1() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1)<!>
}
}
// FILE: TestCase2.kt
// TESTCASE NUMBER: 2
package testPackCase2
class Case2 {
private fun Int.boo(x: Int, y: Int): String = TODO() //(1.1)
private fun Short.boo(x: Int, y: Int): Unit = TODO() //(1.2)
private fun Long.boo(x: Int, y: Int): Unit = TODO() //(1.3)
private fun Byte.boo(x: Int, y: Int): Unit = TODO() //(1.4)
fun case2() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.boo; typeCall: extension function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.boo; typeCall: extension function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
}
// FILE: TestCase4.kt
// TESTCASE NUMBER: 4
package testPackCase4
private operator fun Int.minus(x: String): String = TODO() //(1.1)
private operator fun Short.minus(x: String): Unit = TODO() //(1.2)
private operator fun Byte.minus(x: String): Unit = TODO() //(1.3)
private operator fun Long.minus(x: String): Unit = TODO() //(1.4)
fun case4() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase4.minus; typeCall: operator extension function")!>minus("1")<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>minus("1")<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase4.minus; typeCall: operator extension function")!>this-"1"<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this-"1"<!>
}
}
@@ -0,0 +1,86 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 12 -> sentence 2
* PRIMARY 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 3
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 4
* DESCRIPTION: call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
private fun Int.boo(x: Int): String = TODO() //(1.1)
private fun Int.boo(x: Long): Unit = TODO() //(1.2)
private fun Int.boo(x: Short): Unit = TODO() //(1.3)
private fun Int.boo(x: Byte): Unit = TODO() //(1.4)
fun case1() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo(x = 1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1)<!>
}
}
// FILE: TestCase2.kt
// TESTCASE NUMBER: 2
package testPackCase2
class Case2 {
private fun Int.boo(x: Int, y: Int): String = TODO() //(1.1)
private fun Short.boo(x: Int, y: Int): Unit = TODO() //(1.2)
private fun Long.boo(x: Int, y: Int): Unit = TODO() //(1.3)
private fun Byte.boo(x: Int, y: Int): Unit = TODO() //(1.4)
fun case2() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.boo; typeCall: extension function")!>boo(1, 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1, 2)<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase2.Case2.boo; typeCall: extension function")!>boo(x = 1, y = 2)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(x = 1, y = 2)<!>
}
}
}
// FILE: TestCase4.kt
// TESTCASE NUMBER: 4
package testPackCase4
private operator fun Int.minus(x: String): String = TODO() //(1.1)
private operator fun Short.minus(x: String): Unit = TODO() //(1.2)
private operator fun Byte.minus(x: String): Unit = TODO() //(1.3)
private operator fun Long.minus(x: String): Unit = TODO() //(1.4)
fun case4() {
1.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase4.minus; typeCall: operator extension function")!>minus("1")<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>minus("1")<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: testPackCase4.minus; typeCall: operator extension function")!>this-"1"<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this-"1"<!>
}
}
@@ -0,0 +1,35 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1{
infix fun boo(x: Int): String = TODO() //(1.1)
infix fun boo(x: Long): Unit = TODO() //(1.2)
infix fun boo(x: Short): Unit = TODO() //(1.3)
infix fun boo(x: Byte): Unit = TODO() //(1.4)
}
fun case1(case: Case1) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix function")!>this boo 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this boo 1<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1)<!>
}
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix function")!>case boo 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case boo 1<!>
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix function")!>boo(1)<!>
//(1.1) return type is String
case.boo(1)
}
@@ -0,0 +1,47 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 12 -> sentence 2
* PRIMARY 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 3
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 5
* DESCRIPTION: infix call: different built-in integer types and one of them is kotlin.Int
*/
// TESTCASE NUMBER: 1
class Case1{
infix fun boo(x: Int): String = TODO() //(1.1)
infix fun boo(x: Long): Unit = TODO() //(1.2)
infix fun boo(x: Short): Unit = TODO() //(1.3)
infix fun boo(x: Byte): Unit = TODO() //(1.4)
}
fun case1(case: Case1) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix function")!>this boo 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this boo 1<!>
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(1)<!>
}
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix function")!>case boo 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case boo 1<!>
//to (1.1)
case.<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.boo(1)<!>
}
@@ -0,0 +1,43 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1{
infix fun Int.boo(x: Int): String = TODO() //(1.1)
infix fun Long.boo(x: Long): Unit = TODO() //(1.2)
infix fun Short.boo(x: Short): Unit = TODO() //(1.3)
infix fun Byte.boo(x: Byte): Unit = TODO() //(1.4)
fun case(){
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix extension function")!>1 boo 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1 boo 1<!>
//to (1.1)
1.<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix extension function")!>boo(1)<!>
//(1.1) return type is String
1.boo(1)
}
}
fun case1(case: Case1) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix extension function")!>1 boo 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1 boo 1<!>
1.apply{
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix extension function")!>this boo 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this boo 1<!>
}
}
}
@@ -0,0 +1,55 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 12 -> sentence 2
* PRIMARY 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 3
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* NUMBER: 6
* DESCRIPTION: infix call (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int
*/
// TESTCASE NUMBER: 1
class Case1{
infix fun Int.boo(x: Int): String = TODO() //(1.1)
infix fun Long.boo(x: Long): Unit = TODO() //(1.2)
infix fun Short.boo(x: Short): Unit = TODO() //(1.3)
infix fun Byte.boo(x: Byte): Unit = TODO() //(1.4)
fun case(){
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix extension function")!>1 boo 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1 boo 1<!>
//to (1.1)
1.<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix extension function")!>boo(1)<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1.boo(1)<!>
}
}
fun case1(case: Case1) {
case.apply {
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix extension function")!>1 boo 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>1 boo 1<!>
1.apply{
//to (1.1)
<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: infix extension function")!>this boo 1<!>
//(1.1) return type is String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this boo 1<!>
}
}
}
@@ -0,0 +1,50 @@
// !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 testPackCase1
import testPackCase1.I1.Companion.invoke
import testPackCase1.I2.Companion.invoke
class Case1() : I2, I1 {
fun case() {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>invoke(1)<!>
<!DEBUG_INFO_CALL("fqName: testPackCase1.I1.Companion.invoke; typeCall: operator function")!>invoke(1)<!>
}
}
interface I2{
companion object {
operator fun invoke(x: Short): Unit = print(3) // (3)
}
}
interface I1{
companion object {
operator fun invoke(x: Int): String = "print(3)" // (3)
}
}
// FILE: TestCase2.kt
// TESTCASE NUMBER: 2
class Case2() : I3 {
operator fun invoke(x: Short): Unit = print(3) // (1)
companion object {
operator fun invoke(x: Int): Unit = print(3) // (2)
}
fun case() {
<!DEBUG_INFO_CALL("fqName: I3.invoke; typeCall: operator function")!>invoke(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>invoke(1)<!>
}
}
interface I3 {
operator fun invoke(x: Int): String = "print(3)" // (3)
}
@@ -0,0 +1,64 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 12 -> sentence 2
* PRIMARY 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 3
* built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 1
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 17 -> sentence 1
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 17 -> sentence 3
* NUMBER: 7
* DESCRIPTION: different built-in integer types and one of them is kotlin.Int
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
import testPackCase1.I1.Companion.invoke
import testPackCase1.I2.Companion.invoke
class Case1() : I2, I1 {
fun case() {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>invoke(1)<!>
<!DEBUG_INFO_CALL("fqName: testPackCase1.I1.Companion.invoke; typeCall: operator function")!>invoke(1)<!>
}
}
interface I2{
companion object {
operator fun invoke(x: Short): Unit = print(3) // (3)
}
}
interface I1{
companion object {
operator fun invoke(x: Int): String = "print(3)" // (3)
}
}
// FILE: TestCase2.kt
// TESTCASE NUMBER: 2
class Case2() : I3 {
operator fun invoke(x: Short): Unit = print(3) // (1)
companion object {
operator fun invoke(x: Int): Unit = print(3) // (2)
}
fun case() {
<!DEBUG_INFO_CALL("fqName: Case2.invoke; typeCall: operator function")!>invoke(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>invoke(1)<!>
}
}
interface I3 {
operator fun invoke(x: Int): String = "print(3)" // (3)
}
@@ -0,0 +1,65 @@
// !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, y: Number?): Unit = TODO() // (1)
fun foo(vararg x: Short): Unit = TODO()//(2)
fun testcase() {
<!AMBIGUITY!>foo<!>(1, 1)
}
}
// TESTCASE NUMBER: 2
class Case2() {
fun foo(y: Any, x: Any): Unit = TODO() // (1.1)
fun foo(vararg x: Int?): Unit = TODO() // (1.2)
fun case(){
foo(1, 1)
}
}
// TESTCASE NUMBER: 3
class Case3() {
fun foo(y: Any, x: Any): Unit = TODO() // (1.1)
fun foo(vararg x: Int?): Unit = TODO() // (1.2)
fun case(){
foo(1, 1)
}
}
// TESTCASE NUMBER: 4
class Case4() {
fun foo(y: Int, x: Short): Unit = TODO() // (1.1)
fun foo(y: Int, x: Long): Unit = TODO() // (1.2)
fun case(){
<!AMBIGUITY!>foo<!>(1, 1)
}
}
// TESTCASE NUMBER: 5
class Case5() {
fun foo(y: Int, x: Short): Unit = TODO() // (1.1)
fun foo(y: Int, x: Long, a : Any =""): Unit = TODO() // (1.2)
fun case(){
<!AMBIGUITY!>foo<!>(1, 1)
<!AMBIGUITY!>foo<!>(1, 1)
}
}
// TESTCASE NUMBER: 6
class A : B, C
interface B
interface C
fun foo(x: B) {} //(1)
fun foo(y: C, z: String = "foo") {} //2
fun bar() {
<!AMBIGUITY!>foo<!>(A()) //OVERLOAD_RESOLUTION_AMBIGUITY
}
@@ -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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 14 -> sentence 1
* NUMBER: 1
* DESCRIPTION: an overload ambiguity which must be reported if several candidates which are equally applicable for the call exests
*/
// TESTCASE NUMBER: 1
class Case1() {
fun foo(x: Int, y: Number?): Unit = TODO() // (1)
fun foo(vararg x: Short): Unit = TODO()//(2)
fun testcase() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1, 1)
}
}
// TESTCASE NUMBER: 2
class Case2() {
fun foo(y: Any, x: Any): Unit = TODO() // (1.1)
fun foo(vararg x: Int?): Unit = TODO() // (1.2)
fun case(){
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1, 1)
}
}
// TESTCASE NUMBER: 3
class Case3() {
fun foo(y: Any, x: Any): Unit = TODO() // (1.1)
fun foo(vararg x: Int?): Unit = TODO() // (1.2)
fun case(){
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1, 1)
}
}
// TESTCASE NUMBER: 4
class Case4() {
fun foo(y: Int, x: Short): Unit = TODO() // (1.1)
fun foo(y: Int, x: Long): Unit = TODO() // (1.2)
fun case(){
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1, 1)
}
}
// TESTCASE NUMBER: 5
class Case5() {
fun foo(y: Int, x: Short): Unit = TODO() // (1.1)
fun foo(y: Int, x: Long, a : Any =""): Unit = TODO() // (1.2)
fun case(){
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1, 1)
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1, 1)
}
}
// TESTCASE NUMBER: 6
class A : B, C
interface B
interface C
fun foo(x: B) {} //(1)
fun foo(y: C, z: String = "foo") {} //2
fun bar() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(A()) //OVERLOAD_RESOLUTION_AMBIGUITY
}
@@ -0,0 +1,15 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 6
// NOTE: todo link new sentences
class A : B, C
interface B
interface C
fun foo(x: B) {} //(1)
fun foo(y: C, z: String = "foo") {} //2
fun bar() {
<!AMBIGUITY!>foo<!>(A()) //OVERLOAD_RESOLUTION_AMBIGUITY
}
@@ -0,0 +1,23 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 14 -> sentence 1
* NUMBER: 2
* DESCRIPTION: an overload ambiguity which must be reported if several candidates which are equally applicable for the call exests
*/
// TESTCASE NUMBER: 6
// NOTE: todo link new sentences
class A : B, C
interface B
interface C
fun foo(x: B) {} //(1)
fun foo(y: C, z: String = "foo") {} //2
fun bar() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(A()) //OVERLOAD_RESOLUTION_AMBIGUITY
}
@@ -0,0 +1,56 @@
// !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 testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
class Case2() : I2, I1{
fun test(){
<!AMBIGUITY!>foo<!>(1)
}
}
interface I2{
companion object {
fun foo(x: Int): Unit = print(1) // (1)
}
}
interface I1{
companion object {
fun foo(x: Int): String = "print(2)" // (2)
}
}
// FILE: TestCase2.kt
// TESTCASE NUMBER: 2
package testPackCase2
import testPackCase2.I2.Companion.foo
import testPackCase2.I1.Companion.foo
class Case2() : I2, I1{
fun test(){
<!AMBIGUITY!>foo<!>(1)
}
}
interface I2{
companion object {
fun <T>foo(x: Int): Unit = print(1) // (1)
}
}
interface I1{
companion object {
fun <R>foo(x: Int): String = "print(2)" // (2)
}
}
@@ -0,0 +1,65 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 14 -> sentence 1
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 3
* NUMBER: 3
* DESCRIPTION: call with explicit receiver: different built-in integer types and both of them are kotlin.Int
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
class Case2() : I2, I1{
fun test(){
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1)
}
}
interface I2{
companion object {
fun foo(x: Int): Unit = print(1) // (1)
}
}
interface I1{
companion object {
fun foo(x: Int): String = "print(2)" // (2)
}
}
// FILE: TestCase2.kt
// TESTCASE NUMBER: 2
package testPackCase2
import testPackCase2.I2.Companion.foo
import testPackCase2.I1.Companion.foo
class Case2() : I2, I1{
fun test(){
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1)
}
}
interface I2{
companion object {
fun <T>foo(x: Int): Unit = print(1) // (1)
}
}
interface I1{
companion object {
fun <R>foo(x: Int): String = "print(2)" // (2)
}
}
@@ -0,0 +1,44 @@
// !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 testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
import testPackCase1.I3.Companion.foo
import testPackCase1.I4.Companion.foo
class Case1() : I2, I1, I3, I4 {
fun test() {
<!AMBIGUITY!>foo<!>(1)
}
}
interface I2 {
companion object {
fun <T> foo(x: Int): Unit = print(1) // (1)
}
}
interface I1 {
companion object {
fun foo(x: Int): String = "print(2)" // (2)
}
}
interface I3 {
companion object {
fun foo(x: Short): Unit = print(3) // (3)
}
}
interface I4 {
companion object {
fun foo(x: Int): Unit = print(4) // (4)
}
}
@@ -0,0 +1,55 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 14 -> sentence 1
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 3
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 1
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 2
* NUMBER: 4
* DESCRIPTION: Both candidates are more applicable and few of them are non-parameterized
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
import testPackCase1.I3.Companion.foo
import testPackCase1.I4.Companion.foo
class Case1() : I2, I1, I3, I4 {
fun test() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1)
}
}
interface I2 {
companion object {
fun <T> foo(x: Int): Unit = print(1) // (1)
}
}
interface I1 {
companion object {
fun foo(x: Int): String = "print(2)" // (2)
}
}
interface I3 {
companion object {
fun foo(x: Short): Unit = print(3) // (3)
}
}
interface I4 {
companion object {
fun foo(x: Int): Unit = print(4) // (4)
}
}
@@ -0,0 +1,48 @@
// !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-38912
*/
package testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
import testPackCase1.I3.Companion.foo
import testPackCase1.I4.Companion.foo
class Case1() : I2, I1, I3, I4 {
fun test() {
foo(1)
}
}
interface I2 {
companion object {
fun <T> foo(x: Int): Unit = print(1) // (1)
}
}
interface I1 {
companion object {
fun foo(x: Int, y: Any = ""): String = "print(2)" // (2)
}
}
interface I3 {
companion object {
fun foo(x: Short): Unit = print(3) // (3)
}
}
interface I4 {
companion object {
fun foo(x: Int, y: Any = ""): Unit = print(4) // (4)
}
}
@@ -0,0 +1,60 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 14 -> sentence 1
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 3
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 1
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 2
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* NUMBER: 5
* DESCRIPTION: Both candidates are more applicable and few of them is non-parameterized
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-38912
*/
package testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
import testPackCase1.I3.Companion.foo
import testPackCase1.I4.Companion.foo
class Case1() : I2, I1, I3, I4 {
fun test() {
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!>(1)
}
}
interface I2 {
companion object {
fun <T> foo(x: Int): Unit = print(1) // (1)
}
}
interface I1 {
companion object {
fun foo(x: Int, y: Any = ""): String = "print(2)" // (2)
}
}
interface I3 {
companion object {
fun foo(x: Short): Unit = print(3) // (3)
}
}
interface I4 {
companion object {
fun foo(x: Int, y: Any = ""): Unit = print(4) // (4)
}
}
@@ -0,0 +1,44 @@
// !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 testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
import testPackCase1.I3.Companion.foo
import testPackCase1.I4.Companion.foo
class Case1() : I2, I1, I3, I4 {
fun test() {
<!AMBIGUITY!>foo<!>(1)
}
}
interface I2 {
companion object {
fun <T> foo(x: Int, y: Any): Unit = print(1) // (1)
}
}
interface I1 {
companion object {
fun foo(x: Int, z: Any = "", vararg y: Any): String = "print(2)" // (2)
}
}
interface I3 {
companion object {
fun foo(x: Short, z: Any = "", vararg y: Any): Unit = print(3) // (3)
}
}
interface I4 {
companion object {
fun foo(x: Int, z: Any = "", vararg y: Any): Unit = print(4) // (4)
}
}
@@ -0,0 +1,57 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 14 -> sentence 1
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 3
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 1
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 2
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 4
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 5
* NUMBER: 6
* DESCRIPTION: Both candidates are more applicable and few of them is non-parameterized
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
import testPackCase1.I3.Companion.foo
import testPackCase1.I4.Companion.foo
class Case1() : I2, I1, I3, I4 {
fun test() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1)
}
}
interface I2 {
companion object {
fun <T> foo(x: Int, y: Any): Unit = print(1) // (1)
}
}
interface I1 {
companion object {
fun foo(x: Int, z: Any = "", vararg y: Any): String = "print(2)" // (2)
}
}
interface I3 {
companion object {
fun foo(x: Short, z: Any = "", vararg y: Any): Unit = print(3) // (3)
}
}
interface I4 {
companion object {
fun foo(x: Int, z: Any = "", vararg y: Any): Unit = print(4) // (4)
}
}
@@ -0,0 +1,44 @@
// !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 testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
import testPackCase1.I3.Companion.foo
import testPackCase1.I4.Companion.foo
class Case1() : I2, I1, I3, I4 {
fun test() {
<!AMBIGUITY!>foo<!>(1)
}
}
interface I2 {
companion object {
fun <T> foo(x: Int, y: Any): Unit = print(1) // (1)
}
}
interface I1 {
companion object {
fun foo(x: Int, vararg y: Any): String = "print(2)" // (2)
}
}
interface I3 {
companion object {
fun foo(x: Short, vararg y: Any): Unit = print(3) // (3)
}
}
interface I4 {
companion object {
fun foo(x: Int, vararg y: Any): Unit = print(4) // (4)
}
}
@@ -0,0 +1,56 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 14 -> sentence 1
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 3
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 1
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 2
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 11 -> sentence 5
* NUMBER: 7
* DESCRIPTION: Both candidates are more applicable and few of them is non-parameterized
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
import testPackCase1.I2.Companion.foo
import testPackCase1.I1.Companion.foo
import testPackCase1.I3.Companion.foo
import testPackCase1.I4.Companion.foo
class Case1() : I2, I1, I3, I4 {
fun test() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1)
}
}
interface I2 {
companion object {
fun <T> foo(x: Int, y: Any): Unit = print(1) // (1)
}
}
interface I1 {
companion object {
fun foo(x: Int, vararg y: Any): String = "print(2)" // (2)
}
}
interface I3 {
companion object {
fun foo(x: Short, vararg y: Any): Unit = print(3) // (3)
}
}
interface I4 {
companion object {
fun foo(x: Int, vararg y: Any): Unit = print(4) // (4)
}
}
@@ -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 testPackCase1
class A : I1, I2
interface I1
operator fun I1.invoke(): String = TODO()
interface I2
operator fun I2.invoke(): String = TODO()
fun case1(a: A) {
a.<!AMBIGUITY!>invoke<!>()
<!AMBIGUITY!>a<!>()
<!AMBIGUITY!>A()()<!>
}
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 2
*/
package testPackCase2
interface I : Interface1, Interface2
interface Interface1
operator fun Interface1.invoke(): String = TODO()
interface Interface2
operator fun Interface2.invoke(): String = TODO()
fun case1(a: I) {
a.<!AMBIGUITY!>invoke<!>()
<!AMBIGUITY!>a<!>()
val x = <!AMBIGUITY!>object : I {} ()<!>
}
// FILE: TestCase3.kt
/*
* TESTCASE NUMBER: 3
*/
package testPackCase3
interface I : Interface1, Interface2
interface Interface1
operator fun Interface1.invoke(x :() -> Unit): String = TODO()
interface Interface2
operator fun Interface2.invoke(x :() -> Unit): String = TODO()
fun case1(a: I) {
a.<!AMBIGUITY!>invoke<!>{}
<!AMBIGUITY!>a<!>{}
val x = <!AMBIGUITY!>object : I {} {}<!>
}
@@ -0,0 +1,68 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 17 -> sentence 2
* NUMBER: 1
* DESCRIPTION: If several properties are equally applicable, this is an overload ambiguity as usual
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
*/
package testPackCase1
class A : I1, I2
interface I1
operator fun I1.invoke(): String = TODO()
interface I2
operator fun I2.invoke(): String = TODO()
fun case1(a: A) {
a.<!OVERLOAD_RESOLUTION_AMBIGUITY!>invoke<!>()
<!OVERLOAD_RESOLUTION_AMBIGUITY!>a<!>()
<!OVERLOAD_RESOLUTION_AMBIGUITY!>A()<!>()
}
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 2
*/
package testPackCase2
interface I : Interface1, Interface2
interface Interface1
operator fun Interface1.invoke(): String = TODO()
interface Interface2
operator fun Interface2.invoke(): String = TODO()
fun case1(a: I) {
a.<!OVERLOAD_RESOLUTION_AMBIGUITY!>invoke<!>()
<!OVERLOAD_RESOLUTION_AMBIGUITY!>a<!>()
val x = <!OVERLOAD_RESOLUTION_AMBIGUITY!>object : I<!> {} ()
}
// FILE: TestCase3.kt
/*
* TESTCASE NUMBER: 3
*/
package testPackCase3
interface I : Interface1, Interface2
interface Interface1
operator fun Interface1.invoke(x :() -> Unit): String = TODO()
interface Interface2
operator fun Interface2.invoke(x :() -> Unit): String = TODO()
fun case1(a: I) {
a.<!OVERLOAD_RESOLUTION_AMBIGUITY!>invoke<!>{}
<!OVERLOAD_RESOLUTION_AMBIGUITY!>a<!>{}
val x = <!OVERLOAD_RESOLUTION_AMBIGUITY!>object : I<!> {} {}
}
@@ -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 testPackCase1
class A : I1, I2
interface I1
operator fun <T>I1.invoke(): String = TODO()
interface I2
operator fun <R>I2.invoke(): String = TODO()
fun case1(a: A) {
a.<!AMBIGUITY!>invoke<!>()
<!AMBIGUITY!>a<!>()
<!AMBIGUITY!>A()()<!>
}
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 2
*/
package testPackCase2
interface I : Interface1, Interface2
interface Interface1
operator fun <T>Interface1.invoke(): String = TODO()
interface Interface2
operator fun <R>Interface2.invoke(): String = TODO()
fun case1(a: I) {
a.<!AMBIGUITY!>invoke<!>()
<!AMBIGUITY!>a<!>()
val x = <!AMBIGUITY!>object : I {} ()<!>
}
// FILE: TestCase3.kt
/*
* TESTCASE NUMBER: 3
*/
package testPackCase3
interface I : Interface1, Interface2
interface Interface1
operator fun <R>Interface1.invoke(x :() -> Unit): String = TODO()
interface Interface2
operator fun <T>Interface2.invoke(x :() -> Unit): String = TODO()
fun case1(a: I) {
a.<!AMBIGUITY!>invoke<!>{}
<!AMBIGUITY!>a<!>{}
val x = <!AMBIGUITY!>object : I {} {}<!>
}
@@ -0,0 +1,68 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 17 -> sentence 2
* NUMBER: 2
* DESCRIPTION: If several properties are equally applicable, this is an overload ambiguity as usual (both are parametrized)
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
*/
package testPackCase1
class A : I1, I2
interface I1
operator fun <T>I1.invoke(): String = TODO()
interface I2
operator fun <R>I2.invoke(): String = TODO()
fun case1(a: A) {
a.<!OVERLOAD_RESOLUTION_AMBIGUITY!>invoke<!>()
<!OVERLOAD_RESOLUTION_AMBIGUITY!>a<!>()
<!OVERLOAD_RESOLUTION_AMBIGUITY!>A()<!>()
}
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 2
*/
package testPackCase2
interface I : Interface1, Interface2
interface Interface1
operator fun <T>Interface1.invoke(): String = TODO()
interface Interface2
operator fun <R>Interface2.invoke(): String = TODO()
fun case1(a: I) {
a.<!OVERLOAD_RESOLUTION_AMBIGUITY!>invoke<!>()
<!OVERLOAD_RESOLUTION_AMBIGUITY!>a<!>()
val x = <!OVERLOAD_RESOLUTION_AMBIGUITY!>object : I<!> {} ()
}
// FILE: TestCase3.kt
/*
* TESTCASE NUMBER: 3
*/
package testPackCase3
interface I : Interface1, Interface2
interface Interface1
operator fun <R>Interface1.invoke(x :() -> Unit): String = TODO()
interface Interface2
operator fun <T>Interface2.invoke(x :() -> Unit): String = TODO()
fun case1(a: I) {
a.<!OVERLOAD_RESOLUTION_AMBIGUITY!>invoke<!>{}
<!OVERLOAD_RESOLUTION_AMBIGUITY!>a<!>{}
val x = <!OVERLOAD_RESOLUTION_AMBIGUITY!>object : I<!> {} {}
}
@@ -0,0 +1,37 @@
// !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 case() {
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo("")<!>
}
}
// 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 case() {
<!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 case() {
<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo("")<!>
}
}
@@ -0,0 +1,49 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* PRIMARY LINKS: 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: for every non-default argument of the call a type constraint is built unless both are built-in integer types
*/
// TESTCASE NUMBER: 1
class Case1() {
fun foo(x: CharSequence): Unit = TODO() // (3)
fun foo(x: String, z: String = ""): String = TODO() // (4)
fun case() {
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo("")<!>
}
}
// 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 case() {
<!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 case() {
<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo("")<!>
}
}
@@ -0,0 +1,14 @@
// !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()
fun case() {
this.<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: function")!>boo(1, 1)<!>
this.boo(1, 1)
}
}
@@ -0,0 +1,26 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* PRIMARY LINKS: 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: If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) <:Widen(Y_k) is built
*/
// TESTCASE NUMBER: 1
class Case1 {
fun boo(y: Int, x: Number): Unit = TODO()
fun boo(vararg x: Int): String = TODO()
fun case() {
this.<!DEBUG_INFO_CALL("fqName: Case1.boo; typeCall: function")!>boo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.boo(1, 1)<!>
}
}
@@ -0,0 +1,71 @@
// !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: Short): String = TODO() // (1.1)
fun foo(x: Byte): Unit = TODO() // (1.2)
fun case1() {
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1)<!>
}
}
fun case1(case: Case1) {
case.<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(1)<!>
case.foo(1)
}
// TESTCASE NUMBER: 2
class Case2() {
fun foo(vararg x: Short): String = TODO() // (1.1)
fun foo(vararg x: Byte): Unit = TODO() // (1.2)
fun case2(case: Case2) {
<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1, 1)<!>
}
}
fun case2(case: Case2) {
case.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(1, 1)<!>
case.foo(1, 1)
}
// TESTCASE NUMBER: 3
class Case3() {
fun foo(vararg x: Short): String = TODO() // (1.2)
fun foo(x: Byte): Unit = TODO() // (1.1)
fun case3(case: Case3) {
<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1)<!>
}
}
fun case3(case: Case3) {
case.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(1)<!>
case.foo(1)
}
// TESTCASE NUMBER: 4
class Case4() {
infix fun foo(x: Short): String = TODO() // (1.1)
infix fun foo(x: Byte): Unit = TODO() // (1.2)
fun case() {
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>this foo 1<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this foo 1<!>
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1)<!>
this.<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo(1)<!>
this.foo(1)
}
}
fun case4(case: Case4) {
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>case foo 1<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case foo 1<!>
case.<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo( 1)<!>
case.foo( 1)
}
@@ -0,0 +1,80 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* PRIMARY LINKS: built-in-types-and-their-semantics, built-in-integer-types-1, integer-type-widening -> paragraph 3 -> sentence 2
* NUMBER: 3
* DESCRIPTION: prefer kotlin.Short to kotlin.Byte.
*/
// TESTCASE NUMBER: 1
class Case1() {
fun foo(x: Short): String = TODO() // (1.1)
fun foo(x: Byte): Unit = TODO() // (1.2)
fun case1() {
<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1)<!>
}
}
fun case1(case: Case1) {
case.<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo(1)<!>
}
// TESTCASE NUMBER: 2
class Case2() {
fun foo(vararg x: Short): String = TODO() // (1.1)
fun foo(vararg x: Byte): Unit = TODO() // (1.2)
fun case2(case: Case2) {
<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1, 1)<!>
}
}
fun case2(case: Case2) {
case.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo(1, 1)<!>
}
// TESTCASE NUMBER: 3
class Case3() {
fun foo(vararg x: Short): String = TODO() // (1.2)
fun foo(x: Byte): Unit = TODO() // (1.1)
fun case3(case: Case3) {
<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1)<!>
}
}
fun case3(case: Case3) {
case.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo(1)<!>
}
// TESTCASE NUMBER: 4
class Case4() {
infix fun foo(x: Short): String = TODO() // (1.1)
infix fun foo(x: Byte): Unit = TODO() // (1.2)
fun case() {
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>this foo 1<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this foo 1<!>
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(1)<!>
this.<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.foo(1)<!>
}
}
fun case4(case: Case4) {
<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>case foo 1<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case foo 1<!>
case.<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: infix function")!>foo( 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>case.foo( 1)<!>
}
@@ -0,0 +1,68 @@
// !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, z: String = ""): String = TODO() // (4)
}
fun case() {
<!DEBUG_INFO_CALL("fqName: Case1.Companion.invoke; typeCall: variable&invoke")!>Companion("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>Companion("")<!>
}
}
// 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() {
<!DEBUG_INFO_CALL("fqName: Case2.Companion.invoke; typeCall: variable&invoke")!>Companion(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>Companion(1, 1)<!>
}
}
// TESTCASE NUMBER: 3
class Case3() {
companion object {
operator fun invoke(x: CharSequence, x1: String = ""): Unit = TODO() // (3)
operator fun invoke(x: String, z: Any = ""): String = TODO() // (4)
}
fun case() {
<!DEBUG_INFO_CALL("fqName: Case3.Companion.invoke; typeCall: variable&invoke")!>Companion("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>Companion("")<!>
}
}
// TESTCASE NUMBER: 4
interface I {
companion object {
operator fun invoke(x: CharSequence): Unit = print(1) // (1)
operator fun invoke(x: String, z: String = ""): String { print(2); return "" } // (2)
}
}
class Case4() : I {
companion object {
operator fun invoke(x: CharSequence): Unit = print(3) // (3)
operator fun invoke(x: String, z: String = ""): Any { print(4); return "" } // (4)
}
fun case() {
I.<!DEBUG_INFO_CALL("fqName: I.Companion.invoke; typeCall: operator function")!>invoke("")<!>
I.invoke("")
<!DEBUG_INFO_CALL("fqName: Case4.Companion.invoke; typeCall: operator function")!>invoke("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>invoke("")<!>
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!UNRESOLVED_REFERENCE!>I<!>("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Unresolved name: I")!><!UNRESOLVED_REFERENCE!>I<!>("")<!>
<!DEBUG_INFO_CALL("fqName: Case4.Companion.invoke; typeCall: variable&invoke")!>Case4("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>Case4("")<!>
}
}
@@ -0,0 +1,81 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* PRIMARY LINKS: 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
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 17 -> sentence 1
* overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 17 -> sentence 3
* NUMBER: 4
* DESCRIPTION: for every non-default argument of the call a type constraint is built unless both are built-in integer types (Companion property-like callable)
*/
// TESTCASE NUMBER: 1
class Case1() {
companion object {
operator fun invoke(x: CharSequence): Unit = TODO() // (3)
operator fun invoke(x: String, z: String = ""): String = TODO() // (4)
}
fun case() {
<!DEBUG_INFO_CALL("fqName: Case1.Companion.invoke; typeCall: variable&invoke")!>Companion("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>Companion("")<!>
}
}
// 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() {
<!DEBUG_INFO_CALL("fqName: Case2.Companion.invoke; typeCall: variable&invoke")!>Companion(1, 1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>Companion(1, 1)<!>
}
}
// TESTCASE NUMBER: 3
class Case3() {
companion object {
operator fun invoke(x: CharSequence, x1: String = ""): Unit = TODO() // (3)
operator fun invoke(x: String, z: Any = ""): String = TODO() // (4)
}
fun case() {
<!DEBUG_INFO_CALL("fqName: Case3.Companion.invoke; typeCall: variable&invoke")!>Companion("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>Companion("")<!>
}
}
// TESTCASE NUMBER: 4
interface I {
companion object {
operator fun invoke(x: CharSequence): Unit = print(1) // (1)
operator fun invoke(x: String, z: String = ""): String { print(2); return "" } // (2)
}
}
class Case4() : I {
companion object {
operator fun invoke(x: CharSequence): Unit = print(3) // (3)
operator fun invoke(x: String, z: String = ""): Any { print(4); return "" } // (4)
}
fun case() {
I.<!DEBUG_INFO_CALL("fqName: I.Companion.invoke; typeCall: operator function")!>invoke("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>I.invoke("")<!>
<!DEBUG_INFO_CALL("fqName: Case4.Companion.invoke; typeCall: operator function")!>invoke("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>invoke("")<!>
<!DEBUG_INFO_CALL("fqName: I.Companion.invoke; typeCall: variable&invoke")!>I("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>I("")<!>
<!DEBUG_INFO_CALL("fqName: Case4.Companion.invoke; typeCall: variable&invoke")!>Case4("")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>Case4("")<!>
}
}
@@ -0,0 +1,13 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class A : B, C
interface B
interface C
fun foo(x: B) {} //(1)
fun foo(y: C, z: String = "foo") {} //2
fun case1() {
<!AMBIGUITY!>foo<!>(A()) //OVERLOAD_RESOLUTION_AMBIGUITY
}
@@ -0,0 +1,22 @@
// !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-387
* MAIN LINK:overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 9 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 2
* NUMBER: 1
* DESCRIPTION: Neither of the two candidates is more applicable than the other and both are non-parameterized
*/
// TESTCASE NUMBER: 1
class A : B, C
interface B
interface C
fun foo(x: B) {} //(1)
fun foo(y: C, z: String = "foo") {} //2
fun case1() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(A()) //OVERLOAD_RESOLUTION_AMBIGUITY
}
@@ -0,0 +1,25 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class A : B, C
interface B
interface C
fun <T>foo(x: B) {} //(1)
fun foo(y: C, z: String = "foo") : String = "" //2
fun case1(a: A) {
<!DEBUG_INFO_CALL("fqName: foo; typeCall: function")!>foo(a)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(a)<!>
}
// TESTCASE NUMBER: 2
class A2 : B2, C2
interface B2
interface C2
fun boo(x: B2) ="" //(1)
fun <T>boo(y: C, z: String = "boo") {} //2
fun case2(a: A2) {
<!DEBUG_INFO_CALL("fqName: boo; typeCall: function")!>boo(a)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(a)<!>
}
@@ -0,0 +1,34 @@
// !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-387
* MAIN LINK:overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 9 -> sentence 1
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 7 -> sentence 2
* NUMBER: 1
* DESCRIPTION: Neither of the two candidates is more applicable than the other and one is non-parameterized
*/
// TESTCASE NUMBER: 1
class A : B, C
interface B
interface C
fun <T>foo(x: B) {} //(1)
fun foo(y: C, z: String = "foo") : String = "" //2
fun case1(a: A) {
<!DEBUG_INFO_CALL("fqName: foo; typeCall: function")!>foo(a)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(a)<!>
}
// TESTCASE NUMBER: 2
class A2 : B2, C2
interface B2
interface C2
fun boo(x: B2) ="" //(1)
fun <T>boo(y: C, z: String = "boo") {} //2
fun case2(a: A2) {
<!DEBUG_INFO_CALL("fqName: boo; typeCall: function")!>boo(a)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>boo(a)<!>
}
@@ -0,0 +1,856 @@
{
"14": {
"neg": {
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.6.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "an overload ambiguity which must be reported if several candidates which are equally applicable for the call exests",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "call with explicit receiver: different built-in integer types and both of them are kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.3.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.7.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them are non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.4.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.kt",
"unexpectedBehaviour": true,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 6,
"description": "an overload ambiguity which must be reported if several candidates which are equally applicable for the call exests",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
}
},
"7": {
"neg": {
"3": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.6.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "call with explicit receiver: different built-in integer types and both of them are kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.3.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.7.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them are non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.kt",
"unexpectedBehaviour": true,
"linkType": "primary"
}
],
"2": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "Neither of the two candidates is more applicable than the other and both are non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
]
},
"pos": {
"2": [
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "Neither of the two candidates is more applicable than the other and one is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
],
"3": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "Both candidates are more applicable and few of them are non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/1.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "call with explicit receiver",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.5.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "Both candidates are more applicable and one of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
],
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) \u003c:Widen(Y_k) is built",
"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.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "for every non-default argument of the call a type constraint is built unless both are built-in integer types (Companion property-like callable)",
"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.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "for every non-default argument of the call a type constraint is built unless both are built-in integer types",
"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"
}
]
}
},
"11": {
"neg": {
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.6.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.7.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them are non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.kt",
"unexpectedBehaviour": true,
"linkType": "primary"
}
],
"2": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.6.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.7.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them are non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.kt",
"unexpectedBehaviour": true,
"linkType": "primary"
}
],
"4": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.6.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.kt",
"unexpectedBehaviour": true,
"linkType": "primary"
}
],
"5": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.6.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": " Both candidates are more applicable and few of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.7.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
]
},
"pos": {
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "Both candidates are more applicable and few of them are non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/1.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "Both candidates are more applicable and one of them is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
],
"4": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "call with explicit receiver",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.5.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "call with explicit receiver",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.5.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with explicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with explicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.4.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with implicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.3.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with implicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.3.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
],
"5": [
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "The candidate having any variable-argument parameters is less specific",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/5.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "The candidate having any variable-argument parameters is less specific",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/5.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
]
}
},
"12": {
"pos": {
"2": [
{
"specVersion": "0.1-387",
"casesNumber": 11,
"description": "call with explicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "infix call: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with implicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "infix call (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
}
},
"3": {
"pos": {
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 11,
"description": "call with explicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "infix call: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with implicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "infix call (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "call with explicit receiver",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.5.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with explicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with implicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.3.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) \u003c:Widen(Y_k) is built",
"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.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "prefer kotlin.Short to kotlin.Byte.",
"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.3.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "for every non-default argument of the call a type constraint is built unless both are built-in integer types (Companion property-like callable)",
"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.4.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "for every non-default argument of the call a type constraint is built unless both are built-in integer types",
"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"
}
],
"3": [
{
"specVersion": "0.1-387",
"casesNumber": 11,
"description": "call with explicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "infix call: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with implicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "infix call (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "call with explicit receiver",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.5.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with explicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "The candidate having any variable-argument parameters is less specific",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/5.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with implicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "call with implicit receiver: different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.3.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "call with explicit receiver (built-in integer types extesnsion): different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
],
"4": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) \u003c:Widen(Y_k) is built",
"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.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "for every non-default argument of the call a type constraint is built unless both are built-in integer types (Companion property-like callable)",
"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.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "for every non-default argument of the call a type constraint is built unless both are built-in integer types",
"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"
}
]
}
},
"17": {
"pos": {
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "for every non-default argument of the call a type constraint is built unless both are built-in integer types (Companion property-like callable)",
"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.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
],
"3": [
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "different built-in integer types and one of them is kotlin.Int",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "for every non-default argument of the call a type constraint is built unless both are built-in integer types (Companion property-like callable)",
"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.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
]
},
"neg": {
"2": [
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "If several properties are equally applicable, this is an overload ambiguity as usual",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "If several properties are equally applicable, this is an overload ambiguity as usual (both are parametrized)",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
}
},
"9": {
"neg": {
"2": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "Neither of the two candidates is more applicable than the other and both are non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
},
"pos": {
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 2,
"description": "Neither of the two candidates is more applicable than the other and one is non-parameterized",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
}
},
"8": {
"pos": {
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "If both X_k and Y_k are built-in integer types, a type constraint Widen(X_k) \u003c:Widen(Y_k) is built",
"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.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 4,
"description": "for every non-default argument of the call a type constraint is built unless both are built-in integer types (Companion property-like callable)",
"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.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-387",
"casesNumber": 3,
"description": "for every non-default argument of the call a type constraint is built unless both are built-in integer types",
"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"
}
]
}
}
}
@@ -0,0 +1,85 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1 {
fun <T> List<Any>.foo(x: T): Unit = TODO()
fun <T> List<Number>.foo(x: T): String = TODO()
fun <T : Number> case(list: List<T>, x: T) {
list.<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: extension function")!>foo(x)<!>
list.foo(x)
}
}
// TESTCASE NUMBER: 2
class Case2 {
fun <T> List<T>.foo(x: Int?): Unit = TODO()
fun <T> List<T>.foo(x: Int): String = TODO()
fun case(list: List<Any>) {
list.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: extension function")!>foo(1)<!>
list.foo(1)
}
}
// TESTCASE NUMBER: 3
class Case3 {
fun List<Any>.foo(x: Any): String = TODO()
fun <T> List<Any>.foo(x: T): Unit = TODO()
fun case(list: List<Int>) {
list.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: extension function")!>foo('a')<!>
list.foo('a')
}
}
// TESTCASE NUMBER: 4
class Case4 {
fun <T> List<T>.foo(x: T, y: Any): Unit = TODO()
fun <T> List<T>.foo(x: T, y: CharSequence): Unit = TODO()
fun <T> List<T>.foo(x: T, y: String): String = TODO()
fun case(list: List<Short>, x: Any) {
list.<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: extension function")!>foo(x, "str")<!>
list.foo(x, "str")
}
}
// TESTCASE NUMBER: 5
class Case5 {
class Child : Parent1, Parent2
interface Parent1
interface Parent2 : Parent1
fun foo(x: Parent1) {} //(1)
fun foo(y: Parent2, z: String = "foo"): String = TODO() //2
fun testcase1() {
<!DEBUG_INFO_CALL("fqName: Case5.foo; typeCall: function")!>foo(Child())<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(Child())<!>
}
}
// TESTCASE NUMBER: 6
class Case6 {
class Child : Parent1, Parent2
interface Parent1
interface Parent2 : Parent1
fun foo(x: Parent1, z: String = "foo") {} //(1)
fun foo(y: Parent2): String = TODO() //2
fun testcase1() {
//foo(Child())
<!DEBUG_INFO_CALL("fqName: Case6.foo; typeCall: function")!>foo(Child())<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(Child())<!>
}
}
@@ -0,0 +1,93 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, rationale-1 -> paragraph 2 -> sentence 1
* NUMBER: 1
* DESCRIPTION: The most specific callable can forward itself to any other callable from the overload candidate set, while the opposite is not true.
*/
// TESTCASE NUMBER: 1
class Case1 {
fun <T> List<Any>.foo(x: T): Unit = TODO()
fun <T> List<Number>.foo(x: T): String = TODO()
fun <T : Number> case(list: List<T>, x: T) {
list.<!DEBUG_INFO_CALL("fqName: Case1.foo; typeCall: extension function")!>foo(x)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>list.foo(x)<!>
}
}
// TESTCASE NUMBER: 2
class Case2 {
fun <T> List<T>.foo(x: Int?): Unit = TODO()
fun <T> List<T>.foo(x: Int): String = TODO()
fun case(list: List<Any>) {
list.<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: extension function")!>foo(1)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>list.foo(1)<!>
}
}
// TESTCASE NUMBER: 3
class Case3 {
fun List<Any>.foo(x: Any): String = TODO()
fun <T> List<Any>.foo(x: T): Unit = TODO()
fun case(list: List<Int>) {
list.<!DEBUG_INFO_CALL("fqName: Case3.foo; typeCall: extension function")!>foo('a')<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>list.foo('a')<!>
}
}
// TESTCASE NUMBER: 4
class Case4 {
fun <T> List<T>.foo(x: T, y: Any): Unit = TODO()
fun <T> List<T>.foo(x: T, y: CharSequence): Unit = TODO()
fun <T> List<T>.foo(x: T, y: String): String = TODO()
fun case(list: List<Short>, x: Any) {
list.<!DEBUG_INFO_CALL("fqName: Case4.foo; typeCall: extension function")!>foo(x, "str")<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>list.foo(x, "str")<!>
}
}
// TESTCASE NUMBER: 5
class Case5 {
class Child : Parent1, Parent2
interface Parent1
interface Parent2 : Parent1
fun foo(x: Parent1) {} //(1)
fun foo(y: Parent2, z: String = "foo"): String = TODO() //2
fun testcase1() {
<!DEBUG_INFO_CALL("fqName: Case5.foo; typeCall: function")!>foo(Child())<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(Child())<!>
}
}
// TESTCASE NUMBER: 6
class Case6 {
class Child : Parent1, Parent2
interface Parent1
interface Parent2 : Parent1
fun foo(x: Parent1, z: String = "foo") {} //(1)
fun foo(y: Parent2): String = TODO() //2
fun testcase1() {
//foo(Child())
<!DEBUG_INFO_CALL("fqName: Case6.foo; typeCall: function")!>foo(Child())<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(Child())<!>
}
}
@@ -0,0 +1,15 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1 {
fun <T : Number> List<T>.foo(x: T?) {}
fun <T : Any> List<Any>.foo(x: T) {}
fun <T : Number> case(x: List<T>, y: T) {
x.<!AMBIGUITY!>foo<!>(y)
}
}
@@ -0,0 +1,23 @@
// !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-387
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, rationale-1 -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: If there are several functions with this property, none of them are the most specific and an overload resolution ambiguity error should be reported by the compiler
*/
// TESTCASE NUMBER: 1
class Case1 {
fun <T : Number> List<T>.foo(x: T?) {}
fun <T : Any> List<Any>.foo(x: T) {}
fun <T : Number> case(x: List<T>, y: T) {
x.<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(y)
}
}
@@ -0,0 +1,30 @@
{
"3": {
"neg": {
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 1,
"description": "If there are several functions with this property, none of them are the most specific and an overload resolution ambiguity error should be reported by the compiler",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-3/neg/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
}
},
"2": {
"pos": {
"1": [
{
"specVersion": "0.1-387",
"casesNumber": 6,
"description": "The most specific callable can forward itself to any other callable from the overload candidate set, while the opposite is not true.",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
}
}
}
@@ -25,7 +25,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
}
public void testAllFilesPresentInDiagnostics() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "helpers", "linked/annotations", "linked/control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "linked/control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "linked/declarations/classifier-declaration/classifier-initialization", "linked/declarations/function-declaration", "linked/declarations/property-declaration/property-initialization", "linked/expressions/call-and-property-access-expressions", "linked/expressions/function-literals", "linked/inheritance", "linked/overload-resolution/c-level-partition", "linked/overload-resolution/determining-function-applicability-for-a-specific-call", "linked/overloadable-operators", "linked/statements/assignments/simple-assignments", "linked/type-inference/local-type-inference", "linked/type-inference/smart-casts/smart-cast-types", "linked/type-system/subtyping", "linked/type-system/type-kinds/type-parameters");
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "helpers", "linked/annotations", "linked/built-in-types-and-their-semantics", "linked/control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "linked/control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "linked/declarations/classifier-declaration/classifier-initialization", "linked/declarations/function-declaration", "linked/declarations/property-declaration/property-initialization", "linked/expressions/call-and-property-access-expressions", "linked/expressions/function-literals", "linked/inheritance", "linked/overload-resolution/c-level-partition", "linked/overload-resolution/determining-function-applicability-for-a-specific-call", "linked/overloadable-operators", "linked/statements/assignments/simple-assignments", "linked/type-inference/local-type-inference", "linked/type-inference/smart-casts/smart-cast-types", "linked/type-system/subtyping", "linked/type-system/type-kinds/type-parameters");
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked")
@@ -37,7 +37,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
}
public void testAllFilesPresentInLinked() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "annotations", "control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "declarations/classifier-declaration/classifier-initialization", "declarations/function-declaration", "declarations/property-declaration/property-initialization", "expressions/call-and-property-access-expressions", "expressions/function-literals", "inheritance", "overload-resolution/c-level-partition", "overload-resolution/determining-function-applicability-for-a-specific-call", "overloadable-operators", "statements/assignments/simple-assignments", "type-inference/local-type-inference", "type-inference/smart-casts/smart-cast-types", "type-system/subtyping", "type-system/type-kinds/type-parameters");
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "annotations", "built-in-types-and-their-semantics", "control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "declarations/classifier-declaration/classifier-initialization", "declarations/function-declaration", "declarations/property-declaration/property-initialization", "expressions/call-and-property-access-expressions", "expressions/function-literals", "inheritance", "overload-resolution/c-level-partition", "overload-resolution/determining-function-applicability-for-a-specific-call", "overloadable-operators", "statements/assignments/simple-assignments", "type-inference/local-type-inference", "type-inference/smart-casts/smart-cast-types", "type-system/subtyping", "type-system/type-kinds/type-parameters");
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis")
@@ -4211,6 +4211,426 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Choosing_the_most_specific_candidate_from_the_overload_candidate_set extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInChoosing_the_most_specific_candidate_from_the_overload_candidate_set() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Algorithm_of_msc_selection extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInAlgorithm_of_msc_selection() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_11 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_11() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/1.2.kt");
}
@TestMetadata("4.1.kt")
public void test4_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.1.kt");
}
@TestMetadata("4.2.kt")
public void test4_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.2.kt");
}
@TestMetadata("4.3.kt")
public void test4_3() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.3.kt");
}
@TestMetadata("4.4.kt")
public void test4_4() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.4.kt");
}
@TestMetadata("4.5.kt")
public void test4_5() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.5.kt");
}
@TestMetadata("5.1.kt")
public void test5_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/5.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_12 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_12() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.1.kt");
}
@TestMetadata("2.2.kt")
public void test2_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.2.kt");
}
@TestMetadata("2.3.kt")
public void test2_3() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.3.kt");
}
@TestMetadata("2.4.kt")
public void test2_4() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.4.kt");
}
@TestMetadata("2.5.kt")
public void test2_5() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.5.kt");
}
@TestMetadata("2.6.kt")
public void test2_6() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.6.kt");
}
@TestMetadata("2.7.kt")
public void test2_7() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.7.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_14 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_14() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.2.kt");
}
@TestMetadata("1.3.kt")
public void test1_3() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.3.kt");
}
@TestMetadata("1.4.kt")
public void test1_4() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.4.kt");
}
@TestMetadata("1.5.kt")
public void test1_5() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.kt");
}
@TestMetadata("1.6.kt")
public void test1_6() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.6.kt");
}
@TestMetadata("1.7.kt")
public void test1_7() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.7.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_17 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_17() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Neg extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg/2.1.kt");
}
@TestMetadata("2.2.kt")
public void test2_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg/2.2.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("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")
@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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_9 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_9() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/neg")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Neg extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/neg/2.1.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/pos/1.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Rationale_1 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInRationale_1() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/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("1.1.kt")
public void test1_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2/pos/1.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -25,7 +25,7 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
}
public void testAllFilesPresentInDiagnostics() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "helpers", "linked/annotations", "linked/control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "linked/control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "linked/declarations/classifier-declaration/classifier-initialization", "linked/declarations/function-declaration", "linked/declarations/property-declaration/property-initialization", "linked/expressions/call-and-property-access-expressions", "linked/expressions/function-literals", "linked/inheritance", "linked/overload-resolution/c-level-partition", "linked/overload-resolution/determining-function-applicability-for-a-specific-call", "linked/overloadable-operators", "linked/statements/assignments/simple-assignments", "linked/type-inference/local-type-inference", "linked/type-inference/smart-casts/smart-cast-types", "linked/type-system/subtyping", "linked/type-system/type-kinds/type-parameters");
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "helpers", "linked/annotations", "linked/built-in-types-and-their-semantics", "linked/control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "linked/control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "linked/declarations/classifier-declaration/classifier-initialization", "linked/declarations/function-declaration", "linked/declarations/property-declaration/property-initialization", "linked/expressions/call-and-property-access-expressions", "linked/expressions/function-literals", "linked/inheritance", "linked/overload-resolution/c-level-partition", "linked/overload-resolution/determining-function-applicability-for-a-specific-call", "linked/overloadable-operators", "linked/statements/assignments/simple-assignments", "linked/type-inference/local-type-inference", "linked/type-inference/smart-casts/smart-cast-types", "linked/type-system/subtyping", "linked/type-system/type-kinds/type-parameters");
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked")
@@ -37,7 +37,7 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
}
public void testAllFilesPresentInLinked() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "annotations", "control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "declarations/classifier-declaration/classifier-initialization", "declarations/function-declaration", "declarations/property-declaration/property-initialization", "expressions/call-and-property-access-expressions", "expressions/function-literals", "inheritance", "overload-resolution/c-level-partition", "overload-resolution/determining-function-applicability-for-a-specific-call", "overloadable-operators", "statements/assignments/simple-assignments", "type-inference/local-type-inference", "type-inference/smart-casts/smart-cast-types", "type-system/subtyping", "type-system/type-kinds/type-parameters");
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "annotations", "built-in-types-and-their-semantics", "control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "declarations/classifier-declaration/classifier-initialization", "declarations/function-declaration", "declarations/property-declaration/property-initialization", "expressions/call-and-property-access-expressions", "expressions/function-literals", "inheritance", "overload-resolution/c-level-partition", "overload-resolution/determining-function-applicability-for-a-specific-call", "overloadable-operators", "statements/assignments/simple-assignments", "type-inference/local-type-inference", "type-inference/smart-casts/smart-cast-types", "type-system/subtyping", "type-system/type-kinds/type-parameters");
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis")
@@ -4211,6 +4211,426 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Choosing_the_most_specific_candidate_from_the_overload_candidate_set extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInChoosing_the_most_specific_candidate_from_the_overload_candidate_set() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Algorithm_of_msc_selection extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInAlgorithm_of_msc_selection() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_11 extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_11() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/1.2.kt");
}
@TestMetadata("4.1.kt")
public void test4_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.1.kt");
}
@TestMetadata("4.2.kt")
public void test4_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.2.kt");
}
@TestMetadata("4.3.kt")
public void test4_3() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.3.kt");
}
@TestMetadata("4.4.kt")
public void test4_4() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.4.kt");
}
@TestMetadata("4.5.kt")
public void test4_5() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/4.5.kt");
}
@TestMetadata("5.1.kt")
public void test5_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos/5.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_12 extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_12() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.1.kt");
}
@TestMetadata("2.2.kt")
public void test2_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.2.kt");
}
@TestMetadata("2.3.kt")
public void test2_3() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.3.kt");
}
@TestMetadata("2.4.kt")
public void test2_4() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.4.kt");
}
@TestMetadata("2.5.kt")
public void test2_5() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.5.kt");
}
@TestMetadata("2.6.kt")
public void test2_6() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.6.kt");
}
@TestMetadata("2.7.kt")
public void test2_7() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos/2.7.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_14 extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_14() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.2.kt");
}
@TestMetadata("1.3.kt")
public void test1_3() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.3.kt");
}
@TestMetadata("1.4.kt")
public void test1_4() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.4.kt");
}
@TestMetadata("1.5.kt")
public void test1_5() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.kt");
}
@TestMetadata("1.6.kt")
public void test1_6() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.6.kt");
}
@TestMetadata("1.7.kt")
public void test1_7() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.7.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_17 extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_17() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/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("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg/2.1.kt");
}
@TestMetadata("2.2.kt")
public void test2_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg/2.2.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("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")
@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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_9 extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_9() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/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("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/neg/2.1.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/pos/1.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Rationale_1 extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInRationale_1() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/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("1.1.kt")
public void test1_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2/pos/1.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/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/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -3535,6 +3535,68 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Choosing_the_most_specific_candidate_from_the_overload_candidate_set extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInChoosing_the_most_specific_candidate_from_the_overload_candidate_set() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Algorithm_of_msc_selection extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInAlgorithm_of_msc_selection() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_3 extends AbstractBlackBoxCodegenTestSpec {
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/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
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/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos/1.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)