Structs cannot inherit

suggest change

Unlike classes, structures cannot inherit:

class MyView: NSView { }  // works

struct MyInt: Int { } // error: inheritance from non-protocol type 'Int'

Structures, however, can adopt protocols:

struct Vector: Hashable { ... }  // works

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents