package com.wanji.scala.test import javax.swing.text.AbstractDocument.Content import scala.actors.Actor case class Hello(name:String,content:String,send:Actor) case class HelloBack(name:String,content: String,sender:Actor) /** * 描述:Scala编程实战 * 作者: su…
class A { class B; def foo(b:A#B){} //def foo(b:B){} 后面的a1.foo(b2) 就不能通过编译 } object Main { def main(args: Array[String]): Unit = { val a1 = new A; val b1 = new a1.B; val a2 = new A; val b2 = new a2.B; a1.foo(b2); } }…