[Spec tests] Add fixed tests for expressions section, fix linkage for reference-equality-expressions section

This commit is contained in:
anastasiia.spaseeva
2019-12-26 15:11:29 +03:00
parent 9e3ecbd902
commit e0743f2268
42 changed files with 1162 additions and 106 deletions
@@ -0,0 +1,26 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-220
* PLACE: expressions, comparison-expressions -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: <, >, <= and >= operators are overloadable
*/
// TESTCASE NUMBER: 1
class A(val a: Int) {
fun compareTo(other: A): Int = run {
this.a - other.a
}
}
fun case1() {
val a3 = A(-1)
val a4 = A(-3)
val x = (a3 <!OPERATOR_MODIFIER_REQUIRED!>><!> a4)
}
@@ -1,4 +1,16 @@
{
"1": {
"neg": {
"2": [
{
"specVersion": "0.1-220",
"casesNumber": 1,
"description": "\u003c, \u003e, \u003c\u003d and \u003e\u003d operators are overloadable",
"unexpectedBehaviour": false
}
]
}
},
"4": {
"neg": {
"1": [