-
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
No completion for nextFragment #60298
Comments
Might be related to the fact that class FragmentedElementBuilder<E extends Element2, F extends Fragment> {
final E element;
final F firstFragment;
F lastFragment; More code class ClassElementBuilder
extends InstanceElementBuilder<ClassElementImpl2, ClassElementImpl> {
ClassElementBuilder({
required super.element,
required super.firstFragment,
});
void addFragment(ClassElementImpl fragment) {
addFields(fragment.fields);
addConstructors(fragment.constructors);
addAccessors(fragment.accessors);
addMethods(fragment.methods);
if (identical(fragment, firstFragment)) {
_addFirstFragment();
} else {
lastFragment.augmentation = fragment; // changes here
lastFragment = fragment;
fragment.augmentedInternal = element;
}
}
} |
Not quite, but good guess, it does have a role in the problem not being identified sooner. The problem is that Probably a bug with This would also happen for the first line here but not the second one (may be a getter): ClassElementImpl().nextFragmen^ = null;
ClassElementImpl().nextFragmen^ Repro: class A {
A? myValue;
}
class O extends A {}
abstract class A2 implements A {
@override
O? get myValue;
}
void f(A2 t) {
t.myValu = null;
t.myValu
} |
The problem is actually at: |
Working on this at https://dart-review.googlesource.com/c/sdk/+/414920 |
I think these |
I did that because of: sdk/pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart Lines 1941 to 1969 in 97ba123
If I send in a syntaic setter (which for the above example and the case you found would be), it would not add the suggestion. If I send in the getter without a If you have a better idea I'm all for it. The method that calls sdk/pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart Lines 1029 to 1055 in 97ba123
And the |
But code does not report any static analysis if I type it myself.
The text was updated successfully, but these errors were encountered: