Fix tests: "Placing function type parameters after the function name" error

This commit is contained in:
Yan Zhulanow
2015-11-26 15:56:31 +03:00
parent 3001af56c9
commit a3ff3ffc45
435 changed files with 550 additions and 569 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
inline fun with<T>(receiver : T, body : T.() -> Unit) = receiver.body()
inline fun <T> with(receiver : T, body : T.() -> Unit) = receiver.body()
fun example() {
+2 -1
View File
@@ -9,12 +9,13 @@ JetFile: With.kt
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('with')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('T')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('with')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
+1 -1
View File
@@ -8,7 +8,7 @@ open class ICloseable {
abstract class JavaCloseableWrapper(closeable : java.io.Closeable) : ICloseable(closeable)
fun streamCopy<T>(from : IIterable<T>, to : IAdder<T>) {
fun <T> streamCopy(from : IIterable<T>, to : IAdder<T>) {
for (item in from) t.add(item)
}
+3 -2
View File
@@ -117,12 +117,13 @@ JetFile: IOSamples.kt
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('streamCopy')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('T')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('streamCopy')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
@@ -599,4 +600,4 @@ JetFile: IOSamples.kt
PsiWhiteSpace(' ')
PsiComment(EOL_COMMENT)('// throws IOException, you must catch or rethrow explicitly')
PsiWhiteSpace('\n\n')
PsiElement(RBRACE)('}')
PsiElement(RBRACE)('}')
+1 -1
View File
@@ -10,7 +10,7 @@ enum class ComparisonResult {
typealias MatchableComparison<in T> = (T, T) -> ComparisonResult
fun asMatchableComparison<T>(cmp : Comparison<T>) : MatchableComparison<T> = {a, b ->
fun <T> asMatchableComparison(cmp : Comparison<T>) : MatchableComparison<T> = {a, b ->
val res = cmp(a, b)
if (res == 0) return ComparisonResult.EQ
if (res < 0) return ComparisonResult.LS
+2 -1
View File
@@ -273,12 +273,13 @@ JetFile: Comparison.kt
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('asMatchableComparison')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('T')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('asMatchableComparison')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER