Created
April 28, 2018 22:00
-
-
Save soapyigu/04f1942d4b957d5c11595f665321622c to your computer and use it in GitHub Desktop.
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
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
Queue<Sub *> *subQueue = [[Queue alloc] init]; | |
Queue<Sup *> *supQueue = subQueue; // Warning: Incompatible pointer types initializing 'Queue<Base *>' with an expression of type 'Queue<Sub *>' | |
[supQueue enqueue:[Sub new]]; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment