I'm having trouble convincing the compiler that I'm trying to refer to a function and not a protocol of the same name.
From Cucumberish I have this function:
void Then(NSString * definitionString, CCIStepBody body)
...where CIStepBody
is a closure. Obviously it would be better if the function name weren't capitalized.
And from elsewhere in the project I also have a protocol named Then
. (Again, not the best naming, but not something I can easily change)
The problem, now, is when I try to call the function Then()
the compiler insists that I'm referring to the protocol instead:
'Then' cannot be constructed because it has no accessible initializers
If I try calling it as Cucumberish.Then()
, the compiler thinks I'm talking about the Cucumberish
class in the Cucumberish
framework. So even though I have import Cucumberish
at the top of my file, I can't use that as a module names to qualify other identifiers.
What other ways are there for me to convince the compiler that I'm talking about the function?