I have the following class:
@groovy.transform.InheritConstructors
class PythonBuild {
def basePath
def branchName
PythonBuild(String basePath, String branchName) {
// stuff
}
}
when I instantiate it:
master = PythonBuild('Python-Backend/+MASTER/', 'master')
I get this error:
groovy.lang.MissingMethodException: No signature of method:
Script1.PythonBuild() is applicable for argument types:
(java.lang.String, java.lang.String) values: [Python-Backend/+MASTER/, master]
This error makes no sense to me since, as far as I can tell, the constructor is defined as taking two strings and I am passing two strings.
I am new to Groovy and have got this far by copying examples. What am I doing wrong?
Newifyis not inherited. Could you please check it? AnnotatePythonBuildwithNewify?newwhile initiating new classmaster = new PythonBuild('Python-Backend/+MASTER/', 'master')newinfront ofPythonBuildwhen trying to call the constructor... Voting to close this as a simple typographic errorNewify?staticmethod to call rather than the constructor (?)