Drop obsolete annotations syntax

This commit is contained in:
Denis Zharkov
2015-06-09 13:55:03 +03:00
parent 26864a4407
commit cf4b1ab7cd
133 changed files with 584 additions and 887 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ class BinaryTree<T> : IMutableSet<T> {
constructor() : this(naturalOrder<T>()) {
}
private [operator] fun T.compareTo(other : T) : Int = compare(this, other)
private @[operator] fun T.compareTo(other : T) : Int = compare(this, other)
override fun contains(item : T) : Boolean {
return contains(root, item)
+1
View File
@@ -246,6 +246,7 @@ JetFile: BinaryTree.kt
PsiElement(private)('private')
PsiWhiteSpace(' ')
ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
+2 -2
View File
@@ -23,7 +23,7 @@ fun Int.matchMask(mask : Int) = this and mask == mask
open class INumber : IComparable<This> {
val bits : Int
[operator] fun plus(other : This) : This
[operator] fun shl(bits : Int) : This
@operator fun plus(other : This) : This
@operator fun shl(bits : Int) : This
// ...
}
+14 -18
View File
@@ -557,15 +557,13 @@ JetFile: BitArith.kt
PsiWhiteSpace('\n ')
FUN
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('operator')
PsiElement(RBRACKET)(']')
ANNOTATION_ENTRY
PsiElement(AT)('@')
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('operator')
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
@@ -590,15 +588,13 @@ JetFile: BitArith.kt
PsiWhiteSpace('\n ')
FUN
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('operator')
PsiElement(RBRACKET)(']')
ANNOTATION_ENTRY
PsiElement(AT)('@')
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('operator')
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
+3 -3
View File
@@ -1,16 +1,16 @@
val foo = object : AntBuilder() {
[lazy] val groovy = library {
@lazy val groovy = library {
classpath("$libs/groovy-...")
}
[lazy] val gant = library {
@lazy val gant = library {
File("$gantHome/lib").files.each {
classpath(it)
}
}
[lazy] val JPS = module {
@lazy val JPS = module {
targetLevel = "1.5"
classpath(antLayout, gant, groovy)
src("$projectHome/antLayout/src")
+21 -27
View File
@@ -33,15 +33,13 @@ JetFile: Builder.kt
PsiWhiteSpace('\n\n ')
PROPERTY
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('lazy')
PsiElement(RBRACKET)(']')
ANNOTATION_ENTRY
PsiElement(AT)('@')
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('lazy')
PsiWhiteSpace(' ')
PsiElement(val)('val')
PsiWhiteSpace(' ')
@@ -80,15 +78,13 @@ JetFile: Builder.kt
PsiWhiteSpace('\n\n ')
PROPERTY
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('lazy')
PsiElement(RBRACKET)(']')
ANNOTATION_ENTRY
PsiElement(AT)('@')
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('lazy')
PsiWhiteSpace(' ')
PsiElement(val)('val')
PsiWhiteSpace(' ')
@@ -154,15 +150,13 @@ JetFile: Builder.kt
PsiWhiteSpace('\n\n ')
PROPERTY
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('lazy')
PsiElement(RBRACKET)(']')
ANNOTATION_ENTRY
PsiElement(AT)('@')
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('lazy')
PsiWhiteSpace(' ')
PsiElement(val)('val')
PsiWhiteSpace(' ')
+1 -1
View File
@@ -1,4 +1,4 @@
[inline] fun with<T>(receiver : T, body : T.() -> Unit) = receiver.body()
inline fun with<T>(receiver : T, body : T.() -> Unit) = receiver.body()
fun example() {
+6 -9
View File
@@ -5,15 +5,12 @@ JetFile: With.kt
<empty list>
FUN
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('inline')
PsiElement(RBRACKET)(']')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('inline')
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
+2 -2
View File
@@ -3,11 +3,11 @@
*/
open class ReadOnlyArray<out T> : ISized {
[operator] fun get(index : Int) : T
@[operator] fun get(index : Int) : T
}
open class WriteOnlyArray<in T> : ISized { // This is needed to keep IIterator's <T> covariant
[operator] fun set(index : Int, value : T)
@[operator] fun set(index : Int, value : T)
}
class MutableArray<T> : ReadOnlyArray<T>, WriteOnlyArray<T> {/*...*/}
+2
View File
@@ -42,6 +42,7 @@ JetFile: MutableArray.kt
FUN
MODIFIER_LIST
ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
@@ -109,6 +110,7 @@ JetFile: MutableArray.kt
FUN
MODIFIER_LIST
ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
+3 -3
View File
@@ -19,7 +19,7 @@ open class IMap<K, V> {
class HashableWrapper(val obj : Any) : IHashable
// equals and hashCode implementations are inherited
[inline] fun Any.hashable() : HashableWrapper = HashableWrapper(this)
@[inline] fun Any.hashable() : HashableWrapper = HashableWrapper(this)
open class IHashingStrategy<K> {
fun equals(a : K, b : K) : Boolean
@@ -39,8 +39,8 @@ class JavaObjectHashingStrategy<K> : IHashingStrategy<K> {
}
class HashMap<K, V> : IMap<K, V> {
private [inline] fun hashCode(a : K) = a.hashable().hashCode
private [inline] fun equals(a : K, b : K) = a.hashable() == b
private @[inline] fun hashCode(a : K) = a.hashable().hashCode
private @[inline] fun equals(a : K, b : K) = a.hashable() == b
// everything else uses these equals() and hashCode()...
@@ -330,6 +330,7 @@ JetFile: HashMap.kt
FUN
MODIFIER_LIST
ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
@@ -764,6 +765,7 @@ JetFile: HashMap.kt
PsiElement(private)('private')
PsiWhiteSpace(' ')
ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
@@ -811,6 +813,7 @@ JetFile: HashMap.kt
PsiElement(private)('private')
PsiWhiteSpace(' ')
ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
+1 -1
View File
@@ -1,4 +1,4 @@
open class IList<out T> : IIterable<T>, ISized {
[operator] fun get(index : Int) : T
@[operator] fun get(index : Int) : T
val isEmpty : Boolean
}
+1
View File
@@ -49,6 +49,7 @@ JetFile: IList.kt
FUN
MODIFIER_LIST
ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE