On Sep 7, 2016, at 02:43 , Gerriet M. Denkmann wrote:
>
> But I cannot put it into my switch statement. The compiler says: Cannot
> assign value of type ‘ObjC!’ to type 'BitField?'
> How can I convince the compiler that the ObjC really implements the BitField
> protocol?
This isn’t how it work
I have several Swift classes CclassA, ClassB), all implementing the BitField
protocol:
protocol BitField
{
init?(limit: UInt64, verbose: Int)
}
My AppDelegate Swift class has:
var a: BitField?
switch mm
{
case .A:a = ClassA(limit: maxp, verbose: verbose )
c