AbstractLocalInspectionTest: add LANGUAGE_VERSION support

Related to KT-17164
This commit is contained in:
Mikhail Glukhikh
2017-05-16 14:15:22 +03:00
committed by Mikhail Glukhikh
parent 9990550429
commit 51af18608f
16 changed files with 34 additions and 12 deletions
@@ -1,4 +1,4 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(val strings: Array<String>)
@@ -1,4 +1,4 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(val strings: Array<String>)
@@ -1,3 +1,3 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(val strings: Array<String> = <caret>arrayOf("default"))
@@ -1,3 +1,3 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(val strings: Array<String> = ["default"])
@@ -1,2 +1,3 @@
// LANGUAGE_VERSION: 1.2
// PROBLEM: none
class Some(val strings: Array<String> = <caret>arrayOf("default"))
@@ -1,4 +1,4 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(val strings: Array<String>)
@@ -1,4 +1,4 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(val strings: Array<String>)
@@ -1,4 +1,4 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(val nums: IntArray)
@@ -1,4 +1,4 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(val nums: IntArray)
@@ -1,3 +1,4 @@
// LANGUAGE_VERSION: 1.2
// PROBLEM: none
fun foo() {
@@ -1,3 +1,4 @@
// LANGUAGE_VERSION: 1.2
// PROBLEM: none
// ERROR: Type mismatch: inferred type is Int but Array<String> was expected
@@ -1,4 +1,4 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(val strings: Array<String>)
@@ -1,4 +1,4 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(val strings: Array<String>)
@@ -1,4 +1,4 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(vararg val strings: String)
@@ -1,4 +1,4 @@
// ERROR: The feature "array literals in annotations" is only available since language version 1.2
// LANGUAGE_VERSION: 1.2
annotation class Some(vararg val strings: String)