Instantly share code, notes, and snippets.

Embed
What would you like to do?
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