39
Language FAQ說如何從Scala中的導入中排除/重命名某些類?
import scala.collection.mutable.{_, Map => _, Set => _}
應該從包scala.collection.mutable
導入所有類,除了Map
和Set
。但它給了我這個錯誤:
error: '}' expected but ',' found.
import scala.collection.mutable.{_, Map => _, Set => _}
是否還有辦法做到這一點?
實際上,它是這樣說的:'import scala.collection.mutable。{Map => _,Set => _,_}' – 2010-05-20 16:10:57
是的,現在它的確如此:http://scala.sygneca.com/ faqs/language?rev = 1273682255&do = diff – 2010-05-21 15:25:27