File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
lib/src/services/completion/dart
test/services/completion/dart/declaration Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -383,7 +383,7 @@ class DeclarationHelper {
383
383
var augmented = element.augmented ;
384
384
_addStaticMembers (
385
385
accessors: augmented ? .accessors ?? element.accessors,
386
- constructors: const [] ,
386
+ constructors: augmented ? .constructors ?? element.constructors ,
387
387
containingElement: element,
388
388
fields: augmented ? .fields ?? element.fields,
389
389
methods: augmented ? .methods ?? element.methods);
Original file line number Diff line number Diff line change @@ -184,6 +184,29 @@ suggestions
184
184
''' );
185
185
}
186
186
187
+ Future <void > test_afterPeriod_namedConstructor () async {
188
+ allowedIdentifiers = {'named' };
189
+ await computeSuggestions ('''
190
+ enum E0 {
191
+ o0, t0;
192
+
193
+ factory E0.named() => E0.o0;
194
+ }
195
+ void f() {
196
+ E0.^
197
+ }
198
+ ''' );
199
+ assertResponse (r'''
200
+ suggestions
201
+ named
202
+ kind: constructorInvocation
203
+ o0
204
+ kind: enumConstant
205
+ t0
206
+ kind: enumConstant
207
+ ''' );
208
+ }
209
+
187
210
Future <void > test_afterPeriod_partial () async {
188
211
await computeSuggestions ('''
189
212
enum E0 {
You can’t perform that action at this time.
0 commit comments