[Spec tests] Add fixed tests for expressions section, fix linkage for reference-equality-expressions section
This commit is contained in:
Vendored
+26
@@ -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)
|
||||
}
|
||||
Vendored
+12
@@ -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": [
|
||||
|
||||
Reference in New Issue
Block a user