Java 8 rules for method overrides:
- report errors on implementing methods of Any in interfaces - update testData ~~~ Java 8 override restrictions: interface can't implement a method of 'Any' - update compiler sources
This commit is contained in:
@@ -45,8 +45,8 @@ fun main(args: Array<String>) {
|
||||
println(result)
|
||||
}
|
||||
|
||||
interface Element {
|
||||
fun render(builder: StringBuilder, indent: String)
|
||||
abstract class Element {
|
||||
abstract fun render(builder: StringBuilder, indent: String)
|
||||
|
||||
override fun toString(): String {
|
||||
val builder = StringBuilder()
|
||||
@@ -55,13 +55,13 @@ interface Element {
|
||||
}
|
||||
}
|
||||
|
||||
class TextElement(val text: String) : Element {
|
||||
class TextElement(val text: String) : Element() {
|
||||
override fun render(builder: StringBuilder, indent: String) {
|
||||
builder.append("$indent$text\n")
|
||||
}
|
||||
}
|
||||
|
||||
abstract class Tag(val name: String) : Element {
|
||||
abstract class Tag(val name: String) : Element() {
|
||||
val children = ArrayList<Element>()
|
||||
val attributes = HashMap<String, String>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user