Removed support for "typealias" declarations from the parser
#KT-10683 Fixed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user