New J2K: Fix existing test data
This commit is contained in:
committed by
Ilya Kirillov
parent
9c71d5ca25
commit
ea2081c2f0
+6
@@ -0,0 +1,6 @@
|
||||
internal annotation class A
|
||||
|
||||
internal annotation class B
|
||||
|
||||
class U(@field:B @param:A
|
||||
var i: Int)
|
||||
@@ -0,0 +1,18 @@
|
||||
internal annotation class Anon(val value: String) {
|
||||
|
||||
enum class E {
|
||||
A, B
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
val field = E.A
|
||||
}
|
||||
}
|
||||
|
||||
@Anon("a")
|
||||
internal interface I {
|
||||
companion object {
|
||||
val e = Anon.field
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// ERROR: This annotation is not applicable to target 'local variable'
|
||||
// ERROR: This annotation is not applicable to target 'value parameter'
|
||||
// ERROR: This annotation is not applicable to target 'value parameter'
|
||||
import javaApi.Anon1
|
||||
import javaApi.Anon2
|
||||
import javaApi.Anon3
|
||||
import javaApi.Anon4
|
||||
import javaApi.Anon5
|
||||
import javaApi.Anon6
|
||||
import javaApi.Anon7
|
||||
import javaApi.Anon8
|
||||
import javaApi.E
|
||||
|
||||
|
||||
@Anon1(value = ["a"], stringArray = ["b"], intArray = [1, 2], string = "x")
|
||||
@Anon2(value = "a", intValue = 1, charValue = 'a')
|
||||
@Anon3(e = E.A, stringArray = [], value = ["a", "b"])
|
||||
@Anon4("x", "y")
|
||||
@Anon5(1)
|
||||
@Anon6("x", "y")
|
||||
@Anon7(String::class, StringBuilder::class)
|
||||
@Anon8(classes = [String::class, StringBuilder::class])
|
||||
internal class C {
|
||||
@Anon5(1)
|
||||
@Deprecated("")
|
||||
private val field1 = 0
|
||||
|
||||
@Anon5(1)
|
||||
private val field2 = 0
|
||||
|
||||
@Anon5(1)
|
||||
var field3 = 0
|
||||
|
||||
@Anon5(1)
|
||||
var field4 = 0
|
||||
|
||||
@Anon6
|
||||
fun foo(@Deprecated("") p1: Int, @Deprecated("") @Anon5(2) p2: Char) {
|
||||
@Deprecated("") @Anon5(3) val c = 'a'
|
||||
}
|
||||
|
||||
@Anon5(1)
|
||||
fun bar() {
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
internal annotation class An(val value: String)
|
||||
|
||||
|
||||
class Test {
|
||||
@get:An(value = "get")
|
||||
@set:An(value = "set")
|
||||
var id = 0
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// !forceNotNullTypes: false
|
||||
// !specifyLocalVariableTypeByDefault: true
|
||||
package test
|
||||
|
||||
internal class Foo {
|
||||
fun execute() {}
|
||||
}
|
||||
|
||||
internal class Bar {
|
||||
var fooNotNull = Foo()
|
||||
var fooNullable: Foo? = null
|
||||
}
|
||||
|
||||
internal class Test {
|
||||
fun test(barNotNull: Bar, barNullable: Bar) {
|
||||
barNotNull.fooNotNull.execute()
|
||||
barNotNull.fooNullable!!.execute()
|
||||
barNullable.fooNotNull.execute()
|
||||
barNullable.fooNullable!!.execute()
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
class WithModifiersOnAccessors {
|
||||
|
||||
@get:Synchronized
|
||||
@set:Synchronized
|
||||
var sync = 0
|
||||
|
||||
@get:Strictfp
|
||||
val strict = 0.0
|
||||
|
||||
@Synchronized
|
||||
private fun methSync() {
|
||||
}
|
||||
|
||||
@Strictfp
|
||||
protected fun methStrict() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user