How do I add a parameter to the constructor of a s...
# squarelibraries
t
How do I add a parameter to the constructor of a super interface?
addSuperclassConstructorParameter
doesn't seem to do anything
Adding a
constructorParameter
param to the
addSuperinterface
method results in this error:
Copy code
[ksp] java.lang.IllegalArgumentException: delegating to constructor parameter requires not-null constructor
e
Does the class you are adding a super interface to have a constructor set? Like do you have
TypeSpec.Builder.primaryConstructor
before your call to
addSuperInterface()
t
it doesn't
I need something like so:
Copy code
object A : B("param")