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
About: https://github.com/munificent/ui-as-code/blob/master/ideas/implicit-enums.md
Swift has this feature already, it is quite popular I belief, so you may draw some inspiration from it.
It works for static members of classes, that return the same type as well as for enums.
class Fruit { static var apple = Fruit(name: "apple"); static var banana = Fruit(name: "banana"); var name: String; init(name: String) { self.name = name; } } func printFruit(fruit: Fruit) { print(fruit.name); } // .banana is here inferred as Fruit.banana printFruit(fruit: .banana);
The text was updated successfully, but these errors were encountered:
Thanks for the pointer!
Sorry, something went wrong.
No branches or pull requests
About: https://github.com/munificent/ui-as-code/blob/master/ideas/implicit-enums.md
Swift has this feature already, it is quite popular I belief, so you may draw some inspiration from it.
It works for static members of classes, that return the same type as well as for enums.
The text was updated successfully, but these errors were encountered: