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
Hi!
Should it be possible to reference members of companion objects from the base classes of the current class?
For example:
/** * [fromCompanion] - seems correct */ open class Base { companion object { fun fromCompanion(): Int = 10 } } /** * [fromCompanion] - ??? */ class Child : Base()
A clarification: companion objects from base classes are present as implicit receivers in the child classes. The following code is valid, for example:
class Child(val prop: Int = /*Base.Companion.*/fromCompanion()) : Base()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi!
Should it be possible to reference members of companion objects from the base classes of the current class?
For example:
A clarification: companion objects from base classes are present as implicit receivers in the child classes. The following code is valid, for example:
The text was updated successfully, but these errors were encountered: