What is the _root_ package in Scala?

前端 未结 3 715
面向向阳花
面向向阳花 2020-12-10 00:41

I\'m using IntelliJ IDEA with the Scala plugin. If I reference HashMap in code, and then use Alt-Enter to add the import, the package gets imported as:

_root         


        
3条回答
  •  天命终不由人
    2020-12-10 01:03

    It has to do scala imports being relative - _root_ gives you a way to specify an absolute package name. See the Scala Wiki

提交回复
热议问题