Skip to content

gistya/proto-protocols

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

proto-protocols

A Workaround for some "Protocol can only be used as a generic constraint" error situations

A PATs Swift 3.1 Playground (c) 2017 Jon Gilbert. MIT License. Works with minor mods in Swift 4.

So you want to get around the dreaded error: protocol 'Bar' can only be used as a generic constraint because it has Self or associated type requirements? Here's a possible way. Check out the playgroundpage. It's self-explanatory.

About

A Workaround for some "Protocol can only be used as a generic constraint" error situations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published