Removed support for "typealias" declarations from the parser

#KT-10683 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-01-18 17:59:17 +03:00
parent 38d374d4b9
commit 68853fecc3
33 changed files with 157 additions and 1586 deletions
-4
View File
@@ -1,5 +1,3 @@
typealias Comparison<in T> = (T, T) -> Int
fun naturalOrder<in T : Comparable<T>>(a : T, b : T) : Int = a.compareTo(b)
fun castingNaturalOrder(a : Object, b : Object) : Int = (a as Comparable<Object>).compareTo(b as Comparable<Object>)
@@ -8,8 +6,6 @@ enum class ComparisonResult {
LS, EQ, GR;
}
typealias MatchableComparison<in T> = (T, T) -> ComparisonResult
fun <T> asMatchableComparison(cmp : Comparison<T>) : MatchableComparison<T> = {a, b ->
val res = cmp(a, b)
if (res == 0) return ComparisonResult.EQ