"type" is not a keyword anymore ("typealias" reserved instead)

This commit is contained in:
Andrey Breslav
2014-10-11 02:17:50 +04:00
parent b20439027c
commit cc68ed894b
41 changed files with 695 additions and 717 deletions
@@ -1,4 +1,4 @@
type Comparison<in T> = (T, T) -> Int
typealias Comparison<in T> = (T, T) -> Int
fun naturalOrder<in T : Comparable<T>>(a : T, b : T) : Int = a.compareTo(b)
@@ -8,7 +8,7 @@ enum class ComparisonResult {
LS; EQ; GR
}
type MatchableComparison<in T> = (T, T) -> ComparisonResult
typealias MatchableComparison<in T> = (T, T) -> ComparisonResult
fun asMatchableComparison<T>(cmp : Comparison<T>) : MatchableComparison<T> = {(a, b) ->
val res = cmp(a, b)
@@ -2,7 +2,7 @@ JetFile: Comparison.kt
PACKAGE_DIRECTIVE
<empty list>
TYPEDEF
PsiElement(type)('type')
PsiElement(typealias)('typealias')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('Comparison')
TYPE_PARAMETER_LIST
@@ -231,7 +231,7 @@ JetFile: Comparison.kt
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
TYPEDEF
PsiElement(type)('type')
PsiElement(typealias)('typealias')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('MatchableComparison')
TYPE_PARAMETER_LIST