-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
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
Dartdoc bracketed references don't work for inherited members #4114
Comments
I don't think it's specific to super-params, as this has the same behaviour:
@bwilkerson I think this doesn't currently work because in Should this reference work? And if so, would the correct fix be to walk up |
super
parameters.
I don't know what
I think we want to walk up the superclass chain first and only look in interfaces when we can't find a member from a supertype. I believe that that's the behavior we use in other features, and it would be good to be consistent. I also think that that's the behavior we'd get from using |
I tested the example above, and it does appear to work:
I'll take a look, thanks! |
Fixes Dart-Code/Dart-Code#4114. Change-Id: I47fe2909e4d09366c1e2f432c31076ba690fac7e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256162 Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Fixed by dart-lang/sdk@857a0d2 (ships in the SDK, not a Dart extension update). |
Description
Bracketed references in dartdoc comments don't get highlighted if the field referred to is a superclass parameter.
For instance, if I have:
/// The callback [TextButton.onPressed] will be called when the button is pressed.
Then the bracketed reference to
TextButton.onPressed
is not clickable, but:/// The callback [ButtonStyleButton.onPressed] will be called when the button is pressed.
is clickable.
ButtonStyleButton
is the superclass forTextButton
.I think this is because the
TextButton
class inherits its attribute from the parent via thesuper.onPressed
argument in the constructor, but I can't be sure.Version info
The text was updated successfully, but these errors were encountered: