Fix tests: "Placing function type parameters after the function name" error
This commit is contained in:
@@ -65,7 +65,7 @@ abstract class Tag(val name: String) : Element() {
|
||||
val children = ArrayList<Element>()
|
||||
val attributes = HashMap<String, String>()
|
||||
|
||||
protected fun initTag<T : Element>(tag: T, init: T.() -> Unit): T {
|
||||
protected fun <T : Element> initTag(tag: T, init: T.() -> Unit): T {
|
||||
tag.init()
|
||||
children.add(tag)
|
||||
return tag
|
||||
@@ -89,7 +89,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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user