swift - Can an Associated Type be restricted by protocol conformance and a where-clause? -


i'm trying:

public protocol myprotocol {     associatedtype myarray: rangereplaceablecollectiontype myarray.generator.element == mytype     //... } 

the protocol has property prototype of type [mytype]. decided generalize it. made associated type. can have conform best container type (rangereplaceablecollectiontype) syntax errors when added where clause. there (other) way specify not want generic container, restrict element type?


Popular posts from this blog

Apache NiFi ExecuteScript: Groovy script to replace Json values via a mapping file -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -