-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Occurrences not working correctly for super parameters #48281
Comments
I believe that it already works in DAS, but I will add a test. I think it does not work because IntelliJ plugin does not support super-formal parameters yet. |
Bug: #48281 Change-Id: I137bf5976b9db9c0c511411abaed08fa59542d2b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234223 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
IntelliJ plugin doesn't use This case works fine class A {
int x;
int y;
A(this.x) : y = x * 2;
} because the However, in the case of class A {
A(int x);
}
class B extends A {
int y;
B(super.x) : y = x * 2;
} The I find that targeting |
I agree that for field formal parameters (the first case) and super formal parameters (the second) navigation is inconsistent. I seems to me that for the super formal parameters it is more correct - |
In constructor initializers the reference is to the parameter itself, not the field. Bug: #48281 Change-Id: Ic875e68d9b0d4ebdc08b3a8e71ecd8f0e52c3c26 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244863 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Given a file containing
If I select the reference to
y
in theassert
, then that reference, they
inthis.y
, they
iny = x * 2
, and they
in the field declaration are all highlighted. Basically, we've said that thethis.y
parameter and the field are the same, so any references to either one should all be highlighted at the same time.On the other hand, if I select the
x
insuper.x
, then the field declaration (inA
) is highlighted, but thex
inx * 2
is not. I think that for consistency it needs to be.The text was updated successfully, but these errors were encountered: