Skip to content

Instantly share code, notes, and snippets.

@hborders
Created March 13, 2017 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hborders/f4a1b7c8b0f353d878b4082d1c5a7c63 to your computer and use it in GitHub Desktop.
Save hborders/f4a1b7c8b0f353d878b4082d1c5a7c63 to your computer and use it in GitHub Desktop.
Trying to instantiate a distinct type of a sum type with the wrong parameters
- (void)testWrongValues {
Example * _Nonnull fooExample = [[ExampleFoo alloc] initWithB:2 c:3];
// ^
// error: no visible @interface for 'ExampleFoo' declares the selector 'initWithB:c:'
Example * _Nonnull barExample = [[ExampleBar alloc] initWithF:@"foo" g:@"goo"];
// ^
// error: no visible @interface for 'ExampleBar' declares the selector 'initWithF:g:'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment