为什么会出现错误:代码中的类型不匹配?

时间:2017-09-20 08:28:59

标签: type-mismatch

class Club(val name: String, val stadium: String) {
    // Produces a textual description of the club (which consists of just the club's name).
    override def toString = this.name
}

class Match(val home: String, val away: String) {
    ...
}

val match1 = new Match(club2, club1)

为什么val match1无效?

0 个答案:

没有答案
相关问题