permanently hidden warning in scala application

后端 未结 10 2186
臣服心动
臣服心动 2021-01-31 14:25

I get the following warning whenever I start my Scala application:

WARN - imported `SVNProperties\' is permanently hidden by definition of object SVNProperties in packag

10条回答
  •  面向向阳花
    2021-01-31 15:11

    You probably have code that looks something like this:

    object Hidden {
      import scala.collection.immutable
      object immutable { def x = 7 }
    }
    

    except in a less obvious way. You're importing something--in my example, the package immutable--and then you go and define something else with the same name that prevents you from using what you imported.

    In particular, it looks like you tried to import SVNProperties into SVNResource.scala, except that SVNResource.scala defines its own SVNProperties which hides the import.

提交回复
热议问题