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
+2 -2
View File
@@ -23,7 +23,7 @@ abstract class Tag(val name: String) : Element() {
val children = ArrayList<Element>()
val attributes = HashMap<String, String>()
inline protected fun initTag<T : Element>(tag: T, init: T.() -> Unit): T {
inline protected fun <T : Element> initTag(tag: T, init: T.() -> Unit): T {
tag.init()
children.add(tag)
return tag
@@ -47,7 +47,7 @@ abstract class Tag(val name: String) : Element() {
}
abstract class TagWithText(name: String) : Tag(name) {
fun String.plus() {
operator fun String.unaryPlus() {
children.add(TextElement(this))
}
}
@@ -23,7 +23,7 @@ abstract class Tag(val name: String) : Element() {
val children = ArrayList<Element>()
val attributes = HashMap<String, String>()
inline protected fun initTag<T : Element>(tag: T, init: T.() -> Unit): T {
inline protected fun <T : Element> initTag(tag: T, init: T.() -> Unit): T {
tag.init()
children.add(tag)
return tag
@@ -47,7 +47,7 @@ abstract class Tag(val name: String) : Element() {
}
abstract class TagWithText(name: String) : Tag(name) {
fun String.plus() {
operator fun String.unaryPlus() {
children.add(TextElement(this))
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
package test
inline fun test<reified T>(x: Any): Boolean {
inline fun <reified T> test(x: Any): Boolean {
val x = object {
val y = x is T
}
+1 -1
View File
@@ -1,5 +1,5 @@
package test
inline fun f<reified T>(x : () -> Unit) {
inline fun <reified T> f(x : () -> Unit) {
object { init { arrayOf<T>() } }
}