Seite 1 von 1

sbt submit error

Verfasst: 3. Feb 2018 20:58
von tz33quvu

I have found a strange error when I try to submit.
I annotate @Product and @Command above Command trait like this:

Code: Alles auswählen

trait Command {
  def exec(): Unit
  def undo(): Unit
However, when I submit, it says trait Command is abstract, can not be instantiated; trait Product is abstract, can not be instantiated;
And then I comment these two annotation and successfully submit the codes, what's the issues here?

Re: sbt submit error

Verfasst: 5. Feb 2018 11:21
von meichholz

the problem here is that the class that is referenced by the annotation @Command is the trait Command itself, this is a name clash. You either must do a renaming import of the Command annotation or use the full path to the Command annotation with @de.tudarmstadt.stg.sedc.annotations.command.Command