2
斯卡拉初學者在這裏,我在這裏嘗試的例子:斯卡拉曖昧進口
val nasRDD = parsed.map(md => { md.scores.map(d => NAStatCounter(d)) })
上面給我的錯誤:
<console>:51: error: reference to NAStatCounter is ambiguous;
it is imported twice in the same scope by
import $VAL180.NAStatCounter
and import INSTANCE.NAStatCounter
md.scores.map(d => NAStatCounter(d))
^
誰能請解釋爲什麼這雙進口正在發生。我該如何避免這種情況?
你可以添加所有的進口嗎? – marios