-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@GetIgnore doesn't work on companion object #93
Comments
This is an unfortunate regression since the alternatives to I'll see if I can pinpoint the cause. |
This seems to be caused by the newly added This example service: @VertxGen
interface ExampleService {
@GenIgnore
companion object {
@JvmStatic
fun create(vertx: Vertx): ExampleService = ExampleServiceImpl(vertx)
}
} is compiled into the follow Java code, which has @VertxGen
public interface ExampleService {
>>>>
ExampleService.Companion Companion = ExampleService.Companion.$$INSTANCE;
<<<<
static ExampleService create(Vertx vertx) {
return Companion.create(vertx);
}
@GenIgnore
public static final class Companion {
static final ExampleService.Companion $$INSTANCE;
public final ExampleService create(Vertx vertx) {
return ExampleServiceImpl(vertx);
}
static {
ExampleService.Companion var0 = new ExampleService.Companion();
$$INSTANCE = var0;
}
}
} |
Hi @mystdeim, I'm looking into this and I will come up with an example of how to use |
To my knowledge, companion objects + Workaround solutions (prior to Kotlion 1.3) were discussed here, but they did not provide equivalent functionality: |
This will be fixed in 4.1.0, per #329. |
Fixed by #329 |
After I upgraded to 3.6.0.CR1 getignore annotation was broken
After I run
mvn package
I get:Could not generate model for Companion: type mystdeim.vertx_examples.mvn_kotlin_proxy.service.AccountService.Companion is not legal for use for a constant type in code generation
There's a simple project: https://github.com/mystdeim/vertx_examples/tree/master/mvn_kotlin_proxy
The text was updated successfully, but these errors were encountered: