eclipse-vertx / eclipse-vertx/vertx-codegen

Should throw error on VertxGen declared inside VertxGen/DataObject

Open
#319 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
Java
Stars
111
Forks
89
PR merge metrics
No merged PRs in 30d

Description

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.

```java
@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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.