If we have a receiver parameter in an incorrect position for inner class constructor, the compiler throws a message stating:
"error: ',', ')', or '[' expected"
The above error message is not very intuitive. It should throw an error similar to other normal scenarios like normal class methods and inner class methods. In such cases the error thrown is:
error: as of release 8, 'this' is allowed as the parameter name for the receiver type only, which has to be the first parameter
"error: ',', ')', or '[' expected"
The above error message is not very intuitive. It should throw an error similar to other normal scenarios like normal class methods and inner class methods. In such cases the error thrown is:
error: as of release 8, 'this' is allowed as the parameter name for the receiver type only, which has to be the first parameter