sbt submit error

tz33quvu
Windoof-User
Windoof-User
Beiträge: 40
Registriert: 29. Jan 2017 09:26

sbt submit error

Beitrag von tz33quvu » 3. Feb 2018 20:58

Hi,

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

@Command
@Product
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?

meichholz
Endlosschleifenbastler
Endlosschleifenbastler
Beiträge: 167
Registriert: 30. Mär 2016 08:28

Re: sbt submit error

Beitrag von meichholz » 5. Feb 2018 11:21

Hi,

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

Best,
Matthias

Antworten

Zurück zu „Archiv“