Variable of array which holds objects conform to protocol with associated type
问题 I am trying to build my own Form builder. It was going well until the point when I wanted to get a Value from a Cell . I wanted to make it generic as possible, for instance some Cell s could be responsible of ValueType of Int and others could be String . Anyways, my all Cell s basically conforms to protocol called BaseCell . I assigned a associatedType to this protocol and added a variable value which would return different types for each Cell . After some tryings I come with with the