image 1.0 I'm curious,how it can ..., and why?
if i use { get }
to declare properties in a class, it will report an error.
image 1.0 I'm curious,how it can ..., and why?
if i use { get }
to declare properties in a class, it will report an error.
You are not seeing Foundation.ProcessInfo
implementation only a generated interface.
That is why you have things like :
open var hostName: String { get }
The implementation is elsewhere and you don't have any details about it, you only have informations you need to use ProcessInfo
in your code. For instance you have no internal or private members declared in the generated interface.
XXProcessInfo on the other hand is a class that you are creating and you need to provide the implementation for you properties.