Well, I think the semantics of your class hierarchy are not what you expect. You&#x27;re saying <i>FruitHolder</i> can hold any kind of <i>Fruit</i> but then you&#x27;re trying to &quot;take back&quot; that definition in <i>PeachBasket</i> where you&#x27;re saying &quot;just kidding, it only holds one kind of <i>Fruit</i>&quot;.<p>It&#x27;s better if you explicitly start with the definition that a <i>FruitHolder</i> can only store a type of <i>Fruit</i>, but then use inheritance to abstract your fruits.<p>This works fine:<p><pre><code>    class Fruit {}
    class Peach: Fruit {}
    
    protocol FruitHolder
    {
        typealias FruitKind
        var fruits: [FruitKind] { get }
    }
    
    class PeachBasket: FruitHolder
    {
        typealias FruitKind = Peach
        var fruits: [FruitKind] = []
    }
    
    class FruitBasket: FruitHolder
    {
        typealias FruitKind = Fruit
        var fruits: [FruitKind] = []
    }
    
    var fruitBasket = FruitBasket()
    fruitBasket.fruits += [Fruit(), Peach()]
    
    var peachBasket = PeachBasket()
    
    &#x2F;&#x2F; ERROR:
    peachBasket.fruits += [Fruit(), Peach()]</code></pre>