Intellij compile failures: “is already defined as”

后端 未结 10 1729
北海茫月
北海茫月 2021-02-03 17:14

I\'ve got a scala project that compiles, runs and tests fine when using SBT from the command line. However, when building the project in intellij, it seems every class in the pr

10条回答
  •  太阳男子
    2021-02-03 17:25

    Do you have any other files in your project with an SendCommandToService in them?

    1. You could try renaming it to something else, see if that works

    2. If you want to keep the same names, you can put them into separate packages.

    3. Or have them in different encapsulating objects

    object traitdemo{
     object Ex1{
       ...
      }
    }
    object otherdemo{
      object Ex1 {
        ...
       }
    }
    

    that will work even in the same file

提交回复
热议问题