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
[BUG] @SuperBuilder error info : java: incompatible type: capture#1, total? cannot be converted to #2708
Comments
We need an example to reproduce. |
@SuperBuilder
public class A {
private String a;
}
@SuperBuilder
public class B extends A{
public static void main(String[] args) {
B b = B.builder().a("test").build();
System.out.println(b.toString());
}
}
run error info:
java: incompatible type: capture#1, total? cannot be converted to xxx.xxxx.B
…------------------ 原始邮件 ------------------
发件人: "rzwitserloot/lombok" <notifications@github.com>;
发送时间: 2021年1月12日(星期二) 下午2:15
收件人: "rzwitserloot/lombok"<lombok@noreply.github.com>;
抄送: "工布"<272040138@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [rzwitserloot/lombok] [BUG] @SuperBuilder error info : java: incompatible type: capture#1, total? cannot be converted to (#2708)
We need an example to reproduce.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Is there any work going on this issue with SuperBuilder? Running into the same issue:
|
Difficult to say without source code. You probably have a type parameter on your class and javac is unable to infer the type through your chained builder method calls. Add a type hint to your |
Sorry, how do you add a type hint to a Builder()? |
You should post your code. |
Alright, I have a TestResponse class that is annotated as follows:
I am using this class like this (returning as a response object):
The above code has a compile error saying the following:
|
|
BTW: The code from the original poster compiles and works, so this issue can be closed. Probably a bug from the early days of IntelliJ's |
use @SuperBuilder report error : java: incompatible type: capture#1, total? cannot be converted to
The text was updated successfully, but these errors were encountered: