vertx-codegen icon indicating copy to clipboard operation
vertx-codegen copied to clipboard

Should throw error on VertxGen declared inside VertxGen/DataObject

Open pmlopes opened this issue 4 years ago • 1 comments

Currently, I've noticed a few generation errors regarding how classes and interfaces are annotated.

For example, if a @VertxGen interface has a enum declared inside, this will be valid java code and will compile and no warning is given by codegen. However, you will not be able to process such element.

@VertxGen
interface A {
  @VertxGen
  enum E { }
}

In the example above E will never be processed and no warning or error is raised. I think we should raise an error in this situation.

The same applies for @DataObject. During the processing we should guarantee that this isn't allowed. This pattern is a problem to es4x but may not be for other generators, so we may agree in raising a warning instead.

pmlopes avatar Dec 10 '20 09:12 pmlopes

@cescoffier @codepitbull you also work with codegen can you check if this also affects you?

pmlopes avatar Dec 10 '20 09:12 pmlopes