We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
struct Person: NSObject { }
Will the code above compile? If yes why? If no why?
The text was updated successfully, but these errors were encountered:
No because NSObject is a class and gives you objective c runtime. Structs cannot inherit because it's a value type not a reference type.
Sorry, something went wrong.
Great answer @tseringlamanyc. Also, keep in mind classes in Swift only support single inheritance.
No branches or pull requests
Will the code above compile?
If yes why?
If no why?
The text was updated successfully, but these errors were encountered: