正确写法如下:
class UniformElement(ch:Char,override val width:Int,override val height:Int) extends Element {
private val line = ch.toString * width
def contents = Array.fill(height)(line)
}
正确写法如下:
class UniformElement(ch:Char,override val width:Int,override val height:Int) extends Element {
private val line = ch.toString * width
def contents = Array.fill(height)(line)
}