Replies: 1 comment
-
Apart from whether it should be allow or not, I think it should not allow Because a static method is basically just a function, being able to import the whole struct and only use the public (static) methods seems confusing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think it could be handy to be able to import struct (maybe enum) that is not public - just to access public static methods implemented on them
Ofcourse creation of private struct directly would be still forbidden
Now
struct is private, can't import it. Can get to 'new' only via module name:
Proposal
Because 'new' is public (despite 'Input' is private) I would like to use it without going through module name:
import should allow bringing private structs into scope
privacy rules should be enforced when imported struct is used
Beta Was this translation helpful? Give feedback.
All reactions