[Spec tests] Add overload resolution tests for plus assign operator call

This commit is contained in:
anastasiia.spaseeva
2020-07-28 11:14:26 +03:00
parent 1d83c59e80
commit d5ddb26180
59 changed files with 3756 additions and 8 deletions
@@ -0,0 +1,44 @@
{
"1": {
"neg": {
"2": [
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
},
"pos": {
"2": [
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
}
}
}
@@ -0,0 +1 @@
java.lang.IllegalStateException: UNSAFE_OPERATOR_CALL: Operator call corresponds to a dot-qualified call 'a?.b.plusAssign(c)' which is not allowed on a nullable receiver 'a?.b'. (20,10) in /2.1.kt
@@ -0,0 +1,61 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 1
* DESCRIPTION: nullable receiver
* EXCEPTION: compiletime
*/
fun box(): String {
val a: A? = A(B())
val c: C = C()
a?.b += c
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b.plusAssign(c)
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
operator fun plusAssign(c: C) {
f1 = true
print("1")
}
operator fun plus(c: C): C {
f2 = true
print("2")
return c
}
}
operator fun B.plusAssign(c: C) {
f3 = true
print("3")
}
operator fun B.plusAssign(c: Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1 @@
java.lang.IllegalStateException: UNSAFE_OPERATOR_CALL: Operator call corresponds to a dot-qualified call 'a?.b.plusAssign({ c }())' which is not allowed on a nullable receiver 'a?.b'. (20,10) in /2.2.kt
@@ -0,0 +1,61 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 2
* DESCRIPTION: nullable receiver
* EXCEPTION: compiletime
*/
fun box(): String {
val a: A? = A(B())
val c: C = C()
a?.b += { c }()
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b.plusAssign({ c }())
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
operator fun plusAssign(c: C) {
f1 = true
print("1")
}
operator fun plus(c: C): C {
f2 = true
print("2")
return c
}
}
operator fun B.plusAssign(c: C) {
f3 = true
print("3")
}
operator fun B.plusAssign(c: Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1 @@
java.lang.IllegalStateException: UNSAFE_OPERATOR_CALL: Operator call corresponds to a dot-qualified call 'a?.b.plusAssign(c)' which is not allowed on a nullable receiver 'a?.b'. (20,10) in /2.3.kt
@@ -0,0 +1,61 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 3
* DESCRIPTION: nullable receiver
* EXCEPTION: compiletime
*/
fun box(): String {
val a: A? = A(B())
val c: C? = C()
a?.b += c
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b.plusAssign(c)
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
operator fun plusAssign(c: C) {
f1 = true
print("1")
}
operator fun plus(c: C): C {
f2 = true
print("2")
return c
}
}
operator fun B.plusAssign(c: C) {
f3 = true
print("3")
}
operator fun B.plusAssign(c: Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1 @@
java.lang.IllegalStateException: UNSAFE_OPERATOR_CALL: Operator call corresponds to a dot-qualified call 'a?.b.plusAssign(c)' which is not allowed on a nullable receiver 'a?.b'. (20,10) in /2.4.kt
@@ -0,0 +1,61 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 4
* DESCRIPTION: nullable receiver and infix functions
* EXCEPTION: compiletime
*/
fun box(): String {
val a: A? = A(B())
val c: C = C()
a?.b += c
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b plusAssign c
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
infix operator fun plusAssign(c: C) {
f1 = true
print("1")
}
infix operator fun plus(c: C): C {
f2 = true
print("2")
return c
}
}
infix operator fun B.plusAssign(c: C) {
f3 = true
print("3")
}
infix operator fun B.plusAssign(c: Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1 @@
java.lang.IllegalStateException: UNSAFE_OPERATOR_CALL: Operator call corresponds to a dot-qualified call 'a?.b.plusAssign({ c }())' which is not allowed on a nullable receiver 'a?.b'. (20,10) in /2.5.kt
@@ -0,0 +1,61 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 5
* DESCRIPTION: nullable receiver and infix functions
* EXCEPTION: compiletime
*/
fun box(): String {
val a: A? = A(B())
val c: C = C()
a?.b += { c }()
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b plusAssign { c }()
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
infix operator fun plusAssign(c: C) {
f1 = true
print("1")
}
infix operator fun plus(c: C): C {
f2 = true
print("2")
return c
}
}
infix operator fun B.plusAssign(c: C) {
f3 = true
print("3")
}
infix operator fun B.plusAssign(c: Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1 @@
java.lang.IllegalStateException: UNSAFE_OPERATOR_CALL: Operator call corresponds to a dot-qualified call 'a?.b.plusAssign(c)' which is not allowed on a nullable receiver 'a?.b'. (20,10) in /2.6.kt
@@ -0,0 +1,61 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 6
* DESCRIPTION: nullable receiver and infix functions
* EXCEPTION: compiletime
*/
fun box(): String {
val a: A? = A(B())
val c: C? = C()
a?.b += c
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b plusAssign c
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
infix operator fun plusAssign(c: C) {
f1 = true
print("1")
}
infix operator fun plus(c: C): C {
f2 = true
print("2")
return c
}
}
infix operator fun B.plusAssign(c: C) {
f3 = true
print("3")
}
infix operator fun B.plusAssign(c: Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1,61 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 3
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 1
* DESCRIPTION: nullable receiver
*/
fun box(): String {
val a: A? = A(B())
val c: C = C()
a?.b += c
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b.plusAssign(c)
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
operator fun plusAssign(c: C) {
f1 = true
print("1")
}
operator fun plus(c: C): C {
f2 = true
print("2")
return c
}
}
operator fun B?.plusAssign(c: C) {
f3 = true
print("3")
}
operator fun B?.plusAssign(c: Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1,64 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 3
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 10
* DESCRIPTION: nullable receiver and inline operator function
*/
fun cc() : C = C()
fun box(): String {
val a: A? = A(B())
a!!.b += ::cc
if (!f3 && f1 && !f2 && !f4) {
f1 = false
a!!.b.plusAssign(::cc)
if (f1 && !f3 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
inline operator fun plusAssign(c: ()->C) {
f1 = true
print("1")
}
inline operator fun plus(c: ()->C): C {
f2 = true
print("2")
return c()
}
}
@JvmName("aa")
inline operator fun B?.plusAssign(c: ()->C) {
f3 = true
print("3")
}
@JvmName("bb")
inline operator fun B?.plusAssign(c: ()->Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1,62 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 3
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 2
* DESCRIPTION: nullable receiver
*/
fun box(): String {
val a: A? = A(B())
val c: C = C()
a?.b += { c }()
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b.plusAssign({ c }())
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
operator fun plusAssign(c: C) {
f1 = true
print("1")
}
operator fun plus(c: C): C {
f2 = true
print("2")
return c
}
}
operator fun B?.plusAssign(c: C) {
f3 = true
print("3")
}
operator fun B?.plusAssign(c: Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1,61 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 4
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 3
* DESCRIPTION: nullable receiver
*/
fun box(): String {
val a: A? = A(B())
val c: C? = C()
a!!.b += c?: C()
if (f1 && !f3 && !f2 && !f4) {
f3 = false
a!!.b.plusAssign(c?: C())
if (f1 && !f3 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
operator fun plusAssign(c: C) {
f1 = true
print("1")
}
operator fun plus(c: C?): C {
f2 = true
print("2")
return c!!
}
}
operator fun B?.plusAssign(c: C?) {
f3 = true
print("3")
}
operator fun B?.plusAssign(c: Any?) {
f4 = true
print("4")
}
class C
@@ -0,0 +1,73 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 3
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 4
* DESCRIPTION: nullable receiver
*/
fun box(): String {
val a: A? = A(B())
val c: C? = C()
a!!.b += c
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b.plusAssign(c)
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
var f5 = false
var f6 = false
class B {
operator fun plusAssign(c: C) {
f1 = true
print("1")
}
operator fun plus(c: C?): C {
f2 = true
print("2")
return c!!
}
}
operator fun B?.plusAssign(c: C?) {
f5 = true
print("5")
}
operator fun B?.plusAssign(c: Any?) {
f6 = true
print("6")
}
@JvmName("aa")
operator fun B.plusAssign(c: C?) {
f3 = true
print("3")
}
@JvmName("bb")
operator fun B.plusAssign(c: Any?) {
f4 = true
print("4")
}
class C
@@ -0,0 +1,61 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 3
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 5
* DESCRIPTION: nullable receiver and infix functions
*/
fun box(): String {
val a: A? = A(B())
val c: C = C()
a?.b += c
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b plusAssign c
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
infix operator fun plusAssign(c: C) {
f1 = true
print("1")
}
infix operator fun plus(c: C): C {
f2 = true
print("2")
return c
}
}
infix operator fun B?.plusAssign(c: C) {
f3 = true
print("3")
}
infix operator fun B?.plusAssign(c: Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1,62 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 3
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 6
* DESCRIPTION: nullable receiver and infix functions
*/
fun box(): String {
val a: A? = A(B())
val c: C = C()
a?.b += { c }()
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b plusAssign { c }()
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
infix operator fun plusAssign(c: C) {
f1 = true
print("1")
}
infix operator fun plus(c: C): C {
f2 = true
print("2")
return c
}
}
infix operator fun B?.plusAssign(c: C) {
f3 = true
print("3")
}
infix operator fun B?.plusAssign(c: Any) {
f4 = true
print("4")
}
class C
@@ -0,0 +1,61 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 4
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 7
* DESCRIPTION: nullable receiver and infix functions
*/
fun box(): String {
val a: A? = A(B())
val c: C? = C()
a!!.b += c?: C()
if (f1 && !f3 && !f2 && !f4) {
f3 = false
a!!.b plusAssign (c?: C())
if (f1 && !f3 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
infix operator fun plusAssign(c: C) {
f1 = true
print("1")
}
infix operator fun plus(c: C?): C {
f2 = true
print("2")
return c!!
}
}
infix operator fun B?.plusAssign(c: C?) {
f3 = true
print("3")
}
infix operator fun B?.plusAssign(c: Any?) {
f4 = true
print("4")
}
class C
@@ -0,0 +1,73 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 3
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 8
* DESCRIPTION: nullable receiver
*/
fun box(): String {
val a: A? = A(B())
val c: C? = C()
a!!.b += c
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b plusAssign c
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
var f5 = false
var f6 = false
class B {
infix operator fun plusAssign(c: C) {
f1 = true
print("1")
}
infix operator fun plus(c: C?): C {
f2 = true
print("2")
return c!!
}
}
infix operator fun B?.plusAssign(c: C?) {
f5 = true
print("5")
}
infix operator fun B?.plusAssign(c: Any?) {
f6 = true
print("6")
}
@JvmName("aa")
infix operator fun B.plusAssign(c: C?) {
f3 = true
print("3")
}
@JvmName("bb")
infix operator fun B.plusAssign(c: Any?) {
f4 = true
print("4")
}
class C
@@ -0,0 +1,64 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-488
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 3
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 9
* DESCRIPTION: nullable receiver and inline operator function
*/
fun cc() : C = C()
fun box(): String {
val a: A? = A(B())
a?.b += ::cc
if (f3 && !f1 && !f2 && !f4) {
f3 = false
a?.b.plusAssign(::cc)
if (f3 && !f1 && !f2 && !f4)
return "OK"
}
return "NOK"
}
class A(val b: B)
var f1 = false
var f2 = false
var f3 = false
var f4 = false
class B {
inline operator fun plusAssign(c: ()->C) {
f1 = true
print("1")
}
inline operator fun plus(c: ()->C): C {
f2 = true
print("2")
return c()
}
}
@JvmName("aa")
inline operator fun B?.plusAssign(c: ()->C) {
f3 = true
print("3")
}
@JvmName("bb")
inline operator fun B?.plusAssign(c: ()->Any) {
f4 = true
print("4")
}
class C
@@ -1,4 +1,142 @@
{
"1": {
"neg": {
"2": [
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
},
"pos": {
"2": [
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and inline operator function",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.10.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and inline operator function",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.9.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.8.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
}
},
"2": {
"pos": {
"3": [
@@ -18,6 +18,90 @@
"unexpectedBehaviour": false,
"linkType": "main"
}
],
"3": [
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and inline operator function",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.10.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and inline operator function",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.9.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.8.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
],
"4": [
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
]
}
}
@@ -17,6 +17,54 @@
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
}
],
"2": [
@@ -35,6 +83,54 @@
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
}
],
"3": [
@@ -45,6 +141,54 @@
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg/1.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
}
],
"10": [
@@ -249,6 +393,86 @@
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and inline operator function",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.10.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and inline operator function",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.9.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.8.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
}
],
"2": [
@@ -267,6 +491,86 @@
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and inline operator function",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.10.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and inline operator function",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.9.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.8.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
}
],
"3": [
@@ -277,6 +581,86 @@
"path": "compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos/1.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and inline operator function",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.10.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.5.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.4.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and inline operator function",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.9.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.8.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.7.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-488",
"casesNumber": 0,
"description": "nullable receiver and infix functions",
"path": "compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.6.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
}
],
"10": [
@@ -0,0 +1,47 @@
// !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 C
@JvmName("bb1")
fun C?.boo( c: ()->Any) {} //(1)
@JvmName("aa1")
fun C?.boo( c: ()->C) : String { //(2)
val x = {1}
this.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo( x )<!>// ok to (1)
this.boo( x )
this.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo( {1})<!> //to (2); {1} is ()->C
this.boo( {1})
return ""
}
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 2
*/
package testPackCase2
class C
@JvmName("bb1")
fun C?.boo( c: ()->Any) {} //(1)
@JvmName("aa1")
fun C?.boo( c: ()->C, x : Int = 1) : String { //(2)
val x = {1}
this.<!DEBUG_INFO_CALL("fqName: testPackCase2.boo; typeCall: extension function")!>boo( x )<!>// ok to (1)
this.boo( x )
this.<!DEBUG_INFO_CALL("fqName: testPackCase2.boo; typeCall: extension function")!>boo( {1})<!> //to (2); {1} is ()->C
this.boo( {1})
return ""
}
@@ -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-448
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: call with lambda as argument
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
*/
package testPackCase1
class C
@JvmName("bb1")
fun C?.boo( c: ()->Any) {} //(1)
@JvmName("aa1")
fun C?.boo( c: ()->C) : String { //(2)
val x = {1}
this.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo( x )<!>// ok to (1)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>this.boo( x )<!>
this.<!DEBUG_INFO_CALL("fqName: testPackCase1.boo; typeCall: extension function")!>boo( {<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>})<!> //to (2); {1} is ()->C
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.boo( {<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>})<!>
return ""
}
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 2
*/
package testPackCase2
class C
@JvmName("bb1")
fun C?.boo( c: ()->Any) {} //(1)
@JvmName("aa1")
fun C?.boo( c: ()->C, x : Int = 1) : String { //(2)
val <!NAME_SHADOWING!>x<!> = {1}
this.<!DEBUG_INFO_CALL("fqName: testPackCase2.boo; typeCall: extension function")!>boo( x )<!>// ok to (1)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>this.boo( x )<!>
this.<!DEBUG_INFO_CALL("fqName: testPackCase2.boo; typeCall: extension function")!>boo( {<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>})<!> //to (2); {1} is ()->C
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this.boo( {<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>})<!>
return ""
}
@@ -0,0 +1,27 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
*/
package testPackCase1
class B {
inline operator fun plusAssign(crossinline c: ()->C) {}
inline operator fun plus(crossinline c: ()->C): C = C()
}
@JvmName("bb")
inline operator fun B?.plusAssign( c: ()->Any) { } //(1)
@JvmName("aa")
inline operator fun B?.plusAssign( c: ()->C) { //(2)
this += {1}
<!DEBUG_INFO_CALL("fqName: testPackCase1.plusAssign; typeCall: inline operator extension function")!>this += {1}<!>
}
class C
@@ -0,0 +1,36 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-448
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: plusAssign as inline function
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
*/
package testPackCase1
class B {
inline operator fun plusAssign(crossinline c: ()->C) {}
inline operator fun plus(crossinline c: ()->C): C = C()
}
@JvmName("bb")
inline operator fun B?.plusAssign( c: ()->Any) { } //(1)
@JvmName("aa")
inline operator fun B?.plusAssign( c: ()->C) { //(2)
this <!RECURSION_IN_INLINE!>+=<!> {<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>}
<!DEBUG_INFO_CALL("fqName: testPackCase1.plusAssign; typeCall: inline operator extension function")!>this <!RECURSION_IN_INLINE!>+=<!> {<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>}<!>
}
class C
@@ -0,0 +1,42 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.*
import LibPackCase1.b.*
fun case1 (){
var b: B? = B()
<!DEBUG_INFO_CALL("fqName: LibPackCase1.b.plusAssign; typeCall: operator extension function")!>b += { C() }<!>
<!DEBUG_INFO_CALL("fqName: LibPackCase1.a.plusAssign; typeCall: operator extension function")!>b += {1}<!>
}
class B {
private operator fun plusAssign(c: () -> C) {}
private operator fun plus(c: () -> C): C = c()
}
class C
// FILE: LibCase1.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
operator fun B?.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase1.kt
package LibPackCase1.a
import testPackCase1.B
operator fun B?.plusAssign( c: ()->Int) {} //(1)
@@ -0,0 +1,90 @@
// !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-448
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* NUMBER: 4
* DESCRIPTION: without inline plusAssign functions
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-39819
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.*
import LibPackCase1.b.*
fun case1 (){
var b: B? = B()
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plus; typeCall: operator function"), INVISIBLE_MEMBER, TYPE_MISMATCH!>b <!UNSAFE_OPERATOR_CALL!>+=<!> { C() }<!>
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plus; typeCall: operator function"), INVISIBLE_MEMBER, TYPE_MISMATCH!>b <!UNSAFE_OPERATOR_CALL!>+=<!> {<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>}<!>
}
class B {
private operator fun plusAssign(c: () -> C) {}
private operator fun plus(c: () -> C): C = c() //(3)
}
class C
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
operator fun B?.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
operator fun B?.plusAssign( c: ()->Int) {} //(1)
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 2
* NOTE:
*/
package testPackCase2
import LibPackCase2.a.*
import LibPackCase2.b.*
fun case2 (){
var b: B = B()
<!DEBUG_INFO_CALL("fqName: testPackCase2.B.plus; typeCall: operator function"), INVISIBLE_MEMBER, TYPE_MISMATCH!>b += { C() }<!>
<!DEBUG_INFO_CALL("fqName: testPackCase2.B.plus; typeCall: operator function"), INVISIBLE_MEMBER, TYPE_MISMATCH!>b += {<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>}<!>
}
class B {
private operator fun plusAssign(c: () -> C) {}
private operator fun plus(c: () -> C): C = c() //(3)
}
class C
// FILE: LibCase2b.kt
package LibPackCase2.b
import LibPackCase2.a.*
import testPackCase2.B
import testPackCase2.C
operator fun B.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase2a.kt
package LibPackCase2.a
import testPackCase2.B
operator fun B.plusAssign( c: ()->Int) {} //(1)
@@ -0,0 +1,39 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
// FILE: TestCase1.kt
package testPackCase1
import LibPackCase1.a.*
import LibPackCase1.b.*
fun case1 (){
var b: B? = null
<!DEBUG_INFO_CALL("fqName: LibPackCase1.b.plusAssign; typeCall: inline operator extension function")!>b += { C() }<!>
<!DEBUG_INFO_CALL("fqName: LibPackCase1.a.plusAssign; typeCall: inline operator extension function")!>b += {1}<!>
}
class B {
private inline operator fun plusAssign(c: () -> C) {}
private inline operator fun plus(c: () -> C): C = c()
}
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
inline operator fun B?.plusAssign( c: ()->Int) {} //(1)
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
inline operator fun B?.plusAssign( c: ()->C) {} //(2)
class C
@@ -0,0 +1,50 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-448
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* NUMBER: 5
* DESCRIPTION: inline plusAssign functions
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-39819
*/
// TESTCASE NUMBER: 1
// FILE: TestCase1.kt
package testPackCase1
import LibPackCase1.a.*
import LibPackCase1.b.*
fun case1 (){
var b: B? = null
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plus; typeCall: inline operator function"), INVISIBLE_MEMBER, TYPE_MISMATCH!>b <!UNSAFE_OPERATOR_CALL!>+=<!> { C() }<!>
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plus; typeCall: inline operator function"), INVISIBLE_MEMBER, TYPE_MISMATCH!>b <!UNSAFE_OPERATOR_CALL!>+=<!> {<!CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH, CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>}<!>
}
class B {
private inline operator fun plusAssign(c: () -> C) {}
private inline operator fun plus(c: () -> C): C = c()
}
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
inline operator fun B?.plusAssign( c: ()->Int) {} //(1)
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
inline operator fun B?.plusAssign( c: ()->C) {} //(2)
class C
@@ -0,0 +1,42 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.*
import LibPackCase1.b.*
fun case1 (){
var b: B? = B()
b += { C() }
b += {1}
}
class B {
private operator fun plusAssign(c: () -> C) {}
// private operator fun plus(c: () -> C): C = c()
}
class C
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
operator fun B?.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
operator fun B?.plusAssign( c: ()->Int) {} //(1)
@@ -0,0 +1,53 @@
// !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-448
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* NUMBER: 6
* DESCRIPTION: without inline plusAssign functions
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-39820
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.*
import LibPackCase1.b.*
fun case1 (){
var b: B? = B()
b <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+=<!> { C() }
b <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+=<!> {1}
}
class B {
private operator fun plusAssign(c: () -> C) {}
// private operator fun plus(c: () -> C): C = c()
}
class C
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
operator fun B?.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
operator fun B?.plusAssign( c: ()->Int) {} //(1)
@@ -0,0 +1,42 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.plusAssign
import LibPackCase1.b.plusAssign
fun case1 (){
var b: B? = B()
b += { C() }
b += {1}
}
class B {
private operator fun plusAssign(c: () -> C) {}
// private operator fun plus(c: () -> C): C = c()
}
class C
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
operator fun B?.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
operator fun B?.plusAssign( c: ()->Int) {} //(1)
@@ -0,0 +1,53 @@
// !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-448
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* NUMBER: 7
* DESCRIPTION: without inline plusAssign functions
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-39820
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.plusAssign
import LibPackCase1.b.plusAssign
fun case1 (){
var b: B? = B()
b <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+=<!> { C() }
b <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+=<!> {1}
}
class B {
private operator fun plusAssign(c: () -> C) {}
// private operator fun plus(c: () -> C): C = c()
}
class C
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
operator fun B?.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
operator fun B?.plusAssign( c: ()->Int) {} //(1)
@@ -0,0 +1,73 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.plusAssign
import LibPackCase1.b.plusAssign
fun case1 (){
var b: B = B()
b +={ C() }
b +={ 1 }
}
class B
class C
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
operator fun B?.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
operator fun B?.plusAssign( c: ()->Int) {} //(1)
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase2
import LibPackCase2.a.plusAssign
import LibPackCase2.b.plusAssign
fun case2 (){
var b: B = B()
b +={ C() }
b +={ 1 }
b.<!AMBIGUITY!>plusAssign<!>{ C() }
}
class B
class C
// FILE: LibCase2b.kt
package LibPackCase2.b
import LibPackCase2.a.*
import testPackCase2.B
import testPackCase2.C
operator fun B.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase2a.kt
package LibPackCase2.a
import testPackCase2.B
operator fun B.plusAssign( c: ()->Int) {} //(1)
@@ -0,0 +1,84 @@
// !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-448
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* NUMBER: 8
* DESCRIPTION: without inline plusAssign functions
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-39820
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.plusAssign
import LibPackCase1.b.plusAssign
fun case1 (){
var b: B = B()
b <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+=<!>{ C() }
b <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+=<!>{ 1 }
}
class B
class C
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
operator fun B?.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
operator fun B?.plusAssign( c: ()->Int) {} //(1)
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase2
import LibPackCase2.a.plusAssign
import LibPackCase2.b.plusAssign
fun case2 (){
var b: B = B()
b <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+=<!>{ C() }
b <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>+=<!>{ 1 }
b.<!OVERLOAD_RESOLUTION_AMBIGUITY!>plusAssign<!>{ C() }
}
class B
class C
// FILE: LibCase2b.kt
package LibPackCase2.b
import LibPackCase2.a.*
import testPackCase2.B
import testPackCase2.C
operator fun B.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase2a.kt
package LibPackCase2.a
import testPackCase2.B
operator fun B.plusAssign( c: ()->Int) {} //(1)
@@ -0,0 +1,37 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.plusAssign
fun case1 (){
var b: B = B()
<!INAPPLICABLE_CANDIDATE!>b +={ C() }<!>
b +={ 1 }
}
class B
class C
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
operator fun B?.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
operator fun B?.plusAssign( c: ()->Int) {} //(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 (NEGATIVE)
*
* SPEC VERSION: 0.1-448
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> 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, determining-function-applicability-for-a-specific-call, description -> paragraph 2 -> sentence 2
* NUMBER: 9
* DESCRIPTION: without inline plusAssign functions
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.plusAssign
fun case1 (){
var b: B = B()
b +={ <!TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH!>C()<!> }
b +={ 1 }
}
class B
class C
// FILE: LibCase1b.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
operator fun B?.plusAssign( c: ()->C) {} //(2)
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
operator fun B?.plusAssign( c: ()->Int) {} //(1)
@@ -0,0 +1,120 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNNECESSARY_SAFE_CALL -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(a: A, c: C) {
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>a?.b += c<!>
a?.b .<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>plusAssign(c)<!>
val x = {
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>plusAssign(c)<!>
}()
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>a?.b += { c }()<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>plusAssign({ c }())<!>
}
class A(val b: B)
class B {
operator fun plusAssign(c: C) {
print("1")
}
operator fun plus(c: C): C {
print("2")
return c
}
}
class C
// FILE: TestCase2.kt
// TESTCASE NUMBER: 2
package testPackCase2
fun case2(a: A?, c: C) {
<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>plusAssign(c)<!>
val x = {
<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>plusAssign(c)<!>
}()
<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>a?.b += { c }()<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>plusAssign({ c }())<!>
}
class A(val b: B)
class B {
operator fun plusAssign(c: C) {
print("1")
}
operator fun plus(c: C): C {
print("2")
return c
}
}
operator fun B?.plusAssign(c: C) {
print("3")
}
class C
// FILE: TestCase3.kt
// TESTCASE NUMBER: 3
package testPackCase3
fun case3(a: A?, c: C) {
<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>plusAssign(c)<!>
val x = {
<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>plusAssign(c)<!>
}()
<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>a?.b += { c }()<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>plusAssign({ c }())<!>
}
class A(val b: B)
class B {
operator fun plusAssign(c: C) {
print("1")
}
operator fun plus(c: C): C {
print("2")
return c
}
}
operator fun B?.plusAssign(c: C) {
print("3")
}
operator fun B?.plusAssign(c: Any) {
print("4")
}
class C
@@ -0,0 +1,131 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNNECESSARY_SAFE_CALL -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-448
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* SECONDARY LINKS: statements, assignments, operator-assignments -> paragraph 2 -> sentence 1
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 2
* statements, assignments, operator-assignments -> paragraph 2 -> sentence 3
* NUMBER: 1
* DESCRIPTION: Non-extension member callables
*/
// FILE: TestCase1.kt
// TESTCASE NUMBER: 1
package testPackCase1
fun case1(a: A, c: C) {
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>a?.b += c<!>
a?.b .<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>plusAssign(c)<!>
val x = {
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>plusAssign(c)<!>
}()
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>a?.b += { c }()<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>plusAssign({ c }())<!>
}
class A(val b: B)
class B {
operator fun plusAssign(c: C) {
print("1")
}
operator fun plus(c: C): C {
print("2")
return c
}
}
class C
// FILE: TestCase2.kt
// TESTCASE NUMBER: 2
package testPackCase2
fun case2(a: A?, c: C) {
<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>plusAssign(c)<!>
val x = {
<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>plusAssign(c)<!>
}()
<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>a?.b += { c }()<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase2.plusAssign; typeCall: operator extension function")!>plusAssign({ c }())<!>
}
class A(val b: B)
class B {
operator fun plusAssign(c: C) {
print("1")
}
operator fun plus(c: C): C {
print("2")
return c
}
}
operator fun B?.plusAssign(c: C) {
print("3")
}
class C
// FILE: TestCase3.kt
// TESTCASE NUMBER: 3
package testPackCase3
fun case3(a: A?, c: C) {
<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>plusAssign(c)<!>
val x = {
<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>plusAssign(c)<!>
}()
<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>a?.b += { c }()<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase3.plusAssign; typeCall: operator extension function")!>plusAssign({ c }())<!>
}
class A(val b: B)
class B {
operator fun plusAssign(c: C) {
print("1")
}
operator fun plus(c: C): C {
print("2")
return c
}
}
operator fun B?.plusAssign(c: C) {
print("3")
}
operator fun B?.plusAssign(c: Any) {
print("4")
}
class C
@@ -0,0 +1,36 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// FILE: LibCase1b.kt
// TESTCASE NUMBER: 1
package LibPackCase1.b
import testPackCase1.B
import LibPackCase1.a.*
inline operator fun B?.plusAssign( c: ()->C) { //(2)
val x = {1}
<!DEBUG_INFO_CALL("fqName: LibPackCase1.a.plusAssign; typeCall: inline operator extension function")!>this += x<!> //to (1)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>this += x<!>
}
class C
// FILE: TestCase1.kt
package testPackCase1
import LibPackCase1.a.*
import LibPackCase1.b.*
class B {
private inline operator fun plusAssign(crossinline c: ()->C) {}
private inline operator fun plus(crossinline c: ()->C): C =C()
}
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
inline operator fun B?.plusAssign( c: ()->Int) { } //(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-448
* MAIN LINK: overload-resolution, building-the-overload-candidate-set-ocs, operator-call -> paragraph 1 -> sentence 2
* PRIMARY LINKS: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: plusAssign as inline function
*/
// FILE: LibCase1b.kt
// TESTCASE NUMBER: 1
package LibPackCase1.b
import testPackCase1.B
import LibPackCase1.a.*
inline operator fun B?.plusAssign( c: ()->C) { //(2)
val x = {1}
<!DEBUG_INFO_CALL("fqName: LibPackCase1.a.plusAssign; typeCall: inline operator extension function")!>this += x<!> //to (1)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>this += x<!>
}
class C
// FILE: TestCase1.kt
package testPackCase1
import LibPackCase1.a.*
import LibPackCase1.b.*
class B {
private inline operator fun plusAssign(crossinline c: ()->C) {}
private inline operator fun plus(crossinline c: ()->C): C =C()
}
// FILE: LibCase1a.kt
package LibPackCase1.a
import testPackCase1.B
inline operator fun B?.plusAssign( c: ()->Int) { } //(1)
@@ -17,6 +17,7 @@
// FILE: LibCase1.kt
// TESTCASE NUMBER: 1, 2
// TESTCASE NUMBER: 1, 2
package libPackage
import testPackCase1.Case
@@ -146,5 +146,95 @@
}
]
}
},
"1": {
"neg": {
"2": [
{
"specVersion": "0.1-448",
"casesNumber": 2,
"description": "call with lambda as argument",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt",
"unexpectedBehaviour": true,
"linkType": "main"
},
{
"specVersion": "0.1-448",
"casesNumber": 2,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt",
"unexpectedBehaviour": true,
"linkType": "main"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.9.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.8.kt",
"unexpectedBehaviour": true,
"linkType": "main"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.7.kt",
"unexpectedBehaviour": true,
"linkType": "main"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "plusAssign as inline function",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.6.kt",
"unexpectedBehaviour": true,
"linkType": "main"
}
]
},
"pos": {
"2": [
{
"specVersion": "0.1-448",
"casesNumber": 3,
"description": "Non-extension member callables",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "plusAssign as inline function",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
}
}
}
@@ -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
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.boo
import LibPackCase1.b.boo
fun case1 (b: B?){
b.<!AMBIGUITY!>boo<!>({ C() })
b.<!AMBIGUITY!>boo<!>({1})
}
class B {
// private fun boo(c: () -> C) {}
}
class C
// FILE: LibCase1.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
fun B?.boo( c: ()->C) {} //(2)
// FILE: LibCase1.kt
package LibPackCase1.a
import testPackCase1.B
fun B?.boo( c: ()->Int) { //(1)
}
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 2
*/
package testPackCase2
import LibPackCase2.a.*
import LibPackCase2.b.*
fun case2 (b: B?){
b.<!AMBIGUITY!>boo<!>({ C() })
b.<!AMBIGUITY!>boo<!>({1})
}
class B {
// private fun boo(c: () -> C) {}
}
class C
// FILE: LibCase2.kt
package LibPackCase2.b
import LibPackCase2.a.*
import testPackCase2.B
import testPackCase2.C
fun B?.boo( c: ()->C) {} //(2)
// FILE: LibCase2.kt
package LibPackCase2.a
import testPackCase2.B
fun B?.boo( c: ()->Int) { //(1)
}
@@ -0,0 +1,83 @@
// !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-448
* MAIN LINK: overload-resolution, choosing-the-most-specific-candidate-from-the-overload-candidate-set, algorithm-of-msc-selection -> paragraph 9 -> sentence 2
* NUMBER: 2
* DESCRIPTION: explicit receiver ambuguity
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
* NOTE:
*/
package testPackCase1
import LibPackCase1.a.boo
import LibPackCase1.b.boo
fun case1 (b: B?){
b.<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>({ C() })
b.<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>({1})
}
class B {
// private fun boo(c: () -> C) {}
}
class C
// FILE: LibCase1.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
fun B?.boo( c: ()->C) {} //(2)
// FILE: LibCase1.kt
package LibPackCase1.a
import testPackCase1.B
fun B?.boo( c: ()->Int) { //(1)
}
// FILE: TestCase2.kt
/*
* TESTCASE NUMBER: 2
*/
package testPackCase2
import LibPackCase2.a.*
import LibPackCase2.b.*
fun case2 (b: B?){
b.<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>({ C() })
b.<!OVERLOAD_RESOLUTION_AMBIGUITY!>boo<!>({1})
}
class B {
// private fun boo(c: () -> C) {}
}
class C
// FILE: LibCase2.kt
package LibPackCase2.b
import LibPackCase2.a.*
import testPackCase2.B
import testPackCase2.C
fun B?.boo( c: ()->C) {} //(2)
// FILE: LibCase2.kt
package LibPackCase2.a
import testPackCase2.B
fun B?.boo( c: ()->Int) { //(1)
}
@@ -644,6 +644,14 @@
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "plusAssign as inline function",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-413",
"casesNumber": 2,
@@ -844,6 +852,70 @@
},
"neg": {
"1": [
{
"specVersion": "0.1-448",
"casesNumber": 2,
"description": "call with lambda as argument",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt",
"unexpectedBehaviour": true,
"linkType": "primary"
},
{
"specVersion": "0.1-448",
"casesNumber": 2,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt",
"unexpectedBehaviour": true,
"linkType": "primary"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.9.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.8.kt",
"unexpectedBehaviour": true,
"linkType": "primary"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.7.kt",
"unexpectedBehaviour": true,
"linkType": "primary"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "plusAssign as inline function",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.6.kt",
"unexpectedBehaviour": true,
"linkType": "primary"
},
{
"specVersion": "0.1-413",
"casesNumber": 3,
@@ -935,6 +1007,14 @@
"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"
},
{
"specVersion": "0.1-448",
"casesNumber": 2,
"description": "explicit receiver ambuguity",
"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.2.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
},
@@ -0,0 +1,39 @@
// !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 LibPackCase1.a.boo
import LibPackCase1.b.*
fun case1 (b: B?){
b.boo({ C() })
b.boo({1})
}
class B {
private fun boo(c: () -> C) {}
}
class C
// FILE: LibCase1.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
fun B?.boo( c: ()->C) {} //(2)
// FILE: LibCase1.kt
package LibPackCase1.a
import testPackCase1.B
fun B?.boo( c: ()->Int) { //(1)
}
@@ -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 (NEGATIVE)
*
* SPEC VERSION: 0.1-448
* MAIN LINK: overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 2 -> sentence 2
* PRIMARY LINKS: overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 4 -> sentence 3
* SECONDARY LINKS: overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 5 -> sentence 1
* NUMBER: 1
* DESCRIPTION: explicit receiver with lambda
*/
// FILE: TestCase1.kt
/*
* TESTCASE NUMBER: 1
*/
package testPackCase1
import LibPackCase1.a.boo
import LibPackCase1.b.*
fun case1 (b: B?){
b.boo({ <!TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH!>C()<!> })
b.boo({1})
}
class B {
private fun boo(c: () -> C) {}
}
class C
// FILE: LibCase1.kt
package LibPackCase1.b
import LibPackCase1.a.*
import testPackCase1.B
import testPackCase1.C
fun B?.boo( c: ()->C) {} //(2)
// FILE: LibCase1.kt
package LibPackCase1.a
import testPackCase1.B
fun B?.boo( c: ()->Int) { //(1)
}
@@ -1,6 +1,74 @@
{
"2": {
"neg": {
"2": [
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "without inline plusAssign functions",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.9.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "explicit receiver with lambda",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
]
}
},
"4": {
"neg": {
"3": [
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "explicit receiver with lambda",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
]
}
},
"5": {
"neg": {
"1": [
{
"specVersion": "0.1-448",
"casesNumber": 1,
"description": "explicit receiver with lambda",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
},
{
"specVersion": "0.1-413",
"casesNumber": 1,
"description": "the case of a call with a callable reference as a not parameter",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
]
}
},
"3": {
"neg": {
"1": [
{
"specVersion": "0.1-413",
"casesNumber": 1,
"description": "the case of a call with a callable reference as a not parameter",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
}
],
"3": [
{
"specVersion": "0.1-152",
@@ -7,6 +7,8 @@
*
* SPEC VERSION: 0.1-413
* MAIN LINK: overload-resolution, resolving-callable-references, resolving-callable-references-not-used-as-arguments-to-a-call -> paragraph 1 -> sentence 1
* PRIMARY LINKS: overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 5 -> sentence 1
* SECONDARY LINKS: overload-resolution, determining-function-applicability-for-a-specific-call, description -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: the case of a call with a callable reference as a not parameter
*/
@@ -41,6 +41,14 @@
"path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
},
{
"specVersion": "0.1-448",
"casesNumber": 3,
"description": "Non-extension member callables",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
}
],
"2": [
@@ -51,6 +59,14 @@
"path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-448",
"casesNumber": 3,
"description": "Non-extension member callables",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
}
],
"3": [
@@ -61,6 +77,14 @@
"path": "compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
},
{
"specVersion": "0.1-448",
"casesNumber": 3,
"description": "Non-extension member callables",
"path": "compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "secondary"
}
]
}
@@ -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/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");
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/rationale", "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", "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");
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/rationale", "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")
@@ -3388,7 +3388,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
}
public void testAllFilesPresentInOverload_resolution() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "c-level-partition", "determining-function-applicability-for-a-specific-call");
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "c-level-partition", "determining-function-applicability-for-a-specific-call/rationale");
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs")
@@ -4145,6 +4145,95 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_1 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_1() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Neg extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt");
}
@TestMetadata("2.2.kt")
public void test2_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt");
}
@TestMetadata("2.4.kt")
public void test2_4() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt");
}
@TestMetadata("2.5.kt")
public void test2_5() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt");
}
@TestMetadata("2.6.kt")
public void test2_6() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.6.kt");
}
@TestMetadata("2.7.kt")
public void test2_7() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.7.kt");
}
@TestMetadata("2.8.kt")
public void test2_8() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.8.kt");
}
@TestMetadata("2.9.kt")
public void test2_9() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.9.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Pos extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt");
}
@TestMetadata("2.2.kt")
public void test2_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -4625,6 +4714,11 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
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");
}
@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-9/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-9/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@@ -4726,6 +4820,63 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Determining_function_applicability_for_a_specific_call extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInDetermining_function_applicability_for_a_specific_call() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "rationale");
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Description extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInDescription() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/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/determining-function-applicability-for-a-specific-call/description/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/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/determining-function-applicability-for-a-specific-call/description/p-2/neg/2.1.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/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/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");
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/rationale", "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", "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");
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/rationale", "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")
@@ -3388,7 +3388,7 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
}
public void testAllFilesPresentInOverload_resolution() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "c-level-partition", "determining-function-applicability-for-a-specific-call");
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "c-level-partition", "determining-function-applicability-for-a-specific-call/rationale");
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs")
@@ -4145,6 +4145,95 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_1 extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_1() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Neg extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt");
}
@TestMetadata("2.2.kt")
public void test2_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt");
}
@TestMetadata("2.4.kt")
public void test2_4() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt");
}
@TestMetadata("2.5.kt")
public void test2_5() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt");
}
@TestMetadata("2.6.kt")
public void test2_6() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.6.kt");
}
@TestMetadata("2.7.kt")
public void test2_7() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.7.kt");
}
@TestMetadata("2.8.kt")
public void test2_8() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.8.kt");
}
@TestMetadata("2.9.kt")
public void test2_9() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.9.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Pos extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt");
}
@TestMetadata("2.2.kt")
public void test2_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -4625,6 +4714,11 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
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");
}
@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-9/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-9/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@@ -4726,6 +4820,63 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Determining_function_applicability_for_a_specific_call extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInDetermining_function_applicability_for_a_specific_call() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "rationale");
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Description extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInDescription() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/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/determining-function-applicability-for-a-specific-call/description/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/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/determining-function-applicability-for-a-specific-call/description/p-2/neg/2.1.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/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 BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
}
public void testAllFilesPresentInBox() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, true, "helpers", "templates", "linked/exceptions", "linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver", "linked/overloadable-operators");
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, true, "helpers", "templates", "linked/exceptions", "linked/operator-call", "linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver", "linked/overloadable-operators");
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked")
@@ -37,7 +37,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
}
public void testAllFilesPresentInLinked() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked"), Pattern.compile("^(.+)\\.kt$"), null, true, "exceptions", "overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver", "overloadable-operators");
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked"), Pattern.compile("^(.+)\\.kt$"), null, true, "exceptions", "operator-call", "overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver", "overloadable-operators");
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions")
@@ -3373,6 +3373,125 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_1 extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_1() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Neg extends AbstractBlackBoxCodegenTestSpec {
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/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt");
}
@TestMetadata("2.2.kt")
public void test2_2() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt");
}
@TestMetadata("2.3.kt")
public void test2_3() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.3.kt");
}
@TestMetadata("2.4.kt")
public void test2_4() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt");
}
@TestMetadata("2.5.kt")
public void test2_5() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt");
}
@TestMetadata("2.6.kt")
public void test2_6() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.6.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/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("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt");
}
@TestMetadata("2.10.kt")
public void test2_10() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.10.kt");
}
@TestMetadata("2.2.kt")
public void test2_2() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt");
}
@TestMetadata("2.3.kt")
public void test2_3() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.3.kt");
}
@TestMetadata("2.4.kt")
public void test2_4() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.4.kt");
}
@TestMetadata("2.5.kt")
public void test2_5() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.5.kt");
}
@TestMetadata("2.6.kt")
public void test2_6() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.6.kt");
}
@TestMetadata("2.7.kt")
public void test2_7() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.7.kt");
}
@TestMetadata("2.8.kt")
public void test2_8() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.8.kt");
}
@TestMetadata("2.9.kt")
public void test2_9() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.9.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)