"type" is not a keyword anymore ("typealias" reserved instead)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user