Cuckoo
Cuckoo copied to clipboard
Issue with variable name as `extension`
Hi team I ran into an issue in my class there is a variable named extension, when generating the mocks I get this error message
Getter/setter can only be defined for a single variable
Keyword 'extension' cannot be used as an identifier here
If this name is unavoidable, use backticks to escape it
The class looks like:
class PurchasePathInterfaceProxy: NSObject, PurchasePathInterface {
var `extension`: PurchasePathExtension?
var isBrowserEnabled: Bool = false
func fetch(request: PurchasePathRequest, completion: @escaping (PurchasePath?, Error?) -> Void) {
}
}
It seems like the support for escaping keywords wasn't extended to property names. I assume that it was merely forgotten.
I'll fix this for the upcoming 2.0 release. Thanks for noticing this! 🙂