Created
January 15, 2013 07:07
-
-
Save andyarvanitis/4536807 to your computer and use it in GitHub Desktop.
Eero supports (as an experimental feature) 'instancetype' for method parameter types. Inspired by Jonathan Sterling's blog: http://www.jonmsterling.com/posts/2012-02-05-typed-collections-with-self-types-in-objective-c.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol OrderedCollection <FastEnumeration> | |
| at: UInteger index, return instancetype | |
| put: instancetype object | |
| end | |
| protocol MapCollection <FastEnumeration> | |
| at: id key, return instancetype | |
| put: instancetype object, at: id key | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment