I've disassembled a .jar file and ended up with some files that invoke a constructor:
public Interface_inheritance_specContext(ParserRuleContext parent, int invokingState) { super(invokingState); }
with the following implementation:
public ParserRuleContext(@Nullable ParserRuleContext parent, int invokingStateNumber) {
super(parent, invokingStateNumber);
}
Upon compilation the following error is given:
Error:(199, 92) java: no suitable constructor found for ParserRuleContext(int)
constructor org.antlr.v4.runtime.ParserRuleContext.ParserRuleContext() is not applicable
(actual and formal argument lists differ in length)
constructor org.antlr.v4.runtime.ParserRuleContext.ParserRuleContext(org.antlr.v4.runtime.ParserRuleContext,int) is not applicable
(actual and formal argument lists differ in length)
Looking over this question I don't see any answers that consider @Nullable parameters. The constructor is located in a separate .jar file and I as hoping that I wouldn't have to disassemble it as well.
I noticed that, by adding an extra null parameter solves the issue. But why is the error given in the first place?