mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
Address a review comment that keeps getting missed
Change-Id: I74b0b77da6524300ee3cd4c6a32ce0b225391eab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352048 Auto-Submit: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
parent
03f797a85a
commit
e349b3faef
1 changed files with 1 additions and 1 deletions
|
@ -2519,7 +2519,6 @@ class InScopeCompletionPass extends SimpleAstVisitor<void> {
|
|||
/// beginning of a redirecting constructor invocation.
|
||||
void _forRedirectingConstructorInvocation(
|
||||
ConstructorDeclaration constructor) {
|
||||
var constructorName = constructor.name?.lexeme;
|
||||
var container = constructor.parent;
|
||||
var thisType = switch (container) {
|
||||
ClassDeclaration() => container.declaredElement?.thisType,
|
||||
|
@ -2528,6 +2527,7 @@ class InScopeCompletionPass extends SimpleAstVisitor<void> {
|
|||
_ => null,
|
||||
};
|
||||
if (thisType != null) {
|
||||
var constructorName = constructor.name?.lexeme;
|
||||
declarationHelper(mustBeConstant: constructor.constKeyword != null)
|
||||
.addConstructorNamesForType(type: thisType, exclude: constructorName);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue