@@ -16829,6 +16829,62 @@ library
16829
16829
''');
16830
16830
}
16831
16831
16832
+ test_class_getter_missingName() async {
16833
+ var library = await buildLibrary('''
16834
+ class A {
16835
+ get () => 0;
16836
+ }
16837
+ ''');
16838
+ checkElementText(library, r'''
16839
+ library
16840
+ reference: <testLibrary>
16841
+ definingUnit: <testLibraryFragment>
16842
+ units
16843
+ <testLibraryFragment>
16844
+ enclosingElement3: <null>
16845
+ classes
16846
+ class A @6
16847
+ reference: <testLibraryFragment>::@class::A
16848
+ enclosingElement3: <testLibraryFragment>
16849
+ constructors
16850
+ synthetic @-1
16851
+ reference: <testLibraryFragment>::@class::A::@constructor::new
16852
+ enclosingElement3: <testLibraryFragment>::@class::A
16853
+ methods
16854
+ get @12
16855
+ reference: <testLibraryFragment>::@class::A::@method::get
16856
+ enclosingElement3: <testLibraryFragment>::@class::A
16857
+ returnType: dynamic
16858
+ ----------------------------------------
16859
+ library
16860
+ reference: <testLibrary>
16861
+ fragments
16862
+ <testLibraryFragment>
16863
+ element: <testLibrary>
16864
+ classes
16865
+ class A @6
16866
+ reference: <testLibraryFragment>::@class::A
16867
+ element: <testLibraryFragment>::@class::A#element
16868
+ constructors
16869
+ synthetic <null-name>
16870
+ reference: <testLibraryFragment>::@class::A::@constructor::new
16871
+ element: <testLibraryFragment>::@class::A::@constructor::new#element
16872
+ methods
16873
+ get @12
16874
+ reference: <testLibraryFragment>::@class::A::@method::get
16875
+ element: <testLibraryFragment>::@class::A::@method::get#element
16876
+ classes
16877
+ class A
16878
+ firstFragment: <testLibraryFragment>::@class::A
16879
+ constructors
16880
+ synthetic new
16881
+ firstFragment: <testLibraryFragment>::@class::A::@constructor::new
16882
+ methods
16883
+ get
16884
+ firstFragment: <testLibraryFragment>::@class::A::@method::get
16885
+ ''');
16886
+ }
16887
+
16832
16888
test_class_getter_native() async {
16833
16889
var library = await buildLibrary('''
16834
16890
class C {
@@ -18209,6 +18265,62 @@ library
18209
18265
''');
18210
18266
}
18211
18267
18268
+ test_class_method_missingName() async {
18269
+ var library = await buildLibrary('''
18270
+ class A {
18271
+ () {}
18272
+ }
18273
+ ''');
18274
+ checkElementText(library, r'''
18275
+ library
18276
+ reference: <testLibrary>
18277
+ definingUnit: <testLibraryFragment>
18278
+ units
18279
+ <testLibraryFragment>
18280
+ enclosingElement3: <null>
18281
+ classes
18282
+ class A @6
18283
+ reference: <testLibraryFragment>::@class::A
18284
+ enclosingElement3: <testLibraryFragment>
18285
+ constructors
18286
+ synthetic @-1
18287
+ reference: <testLibraryFragment>::@class::A::@constructor::new
18288
+ enclosingElement3: <testLibraryFragment>::@class::A
18289
+ methods
18290
+ @12
18291
+ reference: <testLibraryFragment>::@class::A::@method::0
18292
+ enclosingElement3: <testLibraryFragment>::@class::A
18293
+ returnType: dynamic
18294
+ ----------------------------------------
18295
+ library
18296
+ reference: <testLibrary>
18297
+ fragments
18298
+ <testLibraryFragment>
18299
+ element: <testLibrary>
18300
+ classes
18301
+ class A @6
18302
+ reference: <testLibraryFragment>::@class::A
18303
+ element: <testLibraryFragment>::@class::A#element
18304
+ constructors
18305
+ synthetic <null-name>
18306
+ reference: <testLibraryFragment>::@class::A::@constructor::new
18307
+ element: <testLibraryFragment>::@class::A::@constructor::new#element
18308
+ methods
18309
+ <null-name>
18310
+ reference: <testLibraryFragment>::@class::A::@method::0
18311
+ element: <testLibraryFragment>::@class::A::@method::0#element
18312
+ classes
18313
+ class A
18314
+ firstFragment: <testLibraryFragment>::@class::A
18315
+ constructors
18316
+ synthetic new
18317
+ firstFragment: <testLibraryFragment>::@class::A::@constructor::new
18318
+ methods
18319
+
18320
+ firstFragment: <testLibraryFragment>::@class::A::@method::0
18321
+ ''');
18322
+ }
18323
+
18212
18324
test_class_method_namedAsSupertype() async {
18213
18325
var library = await buildLibrary(r'''
18214
18326
class A {}
@@ -23122,6 +23234,71 @@ library
23122
23234
''');
23123
23235
}
23124
23236
23237
+ test_class_setter_missingName() async {
23238
+ var library = await buildLibrary('''
23239
+ class A {
23240
+ set (int _) {}
23241
+ }
23242
+ ''');
23243
+ checkElementText(library, r'''
23244
+ library
23245
+ reference: <testLibrary>
23246
+ definingUnit: <testLibraryFragment>
23247
+ units
23248
+ <testLibraryFragment>
23249
+ enclosingElement3: <null>
23250
+ classes
23251
+ class A @6
23252
+ reference: <testLibraryFragment>::@class::A
23253
+ enclosingElement3: <testLibraryFragment>
23254
+ constructors
23255
+ synthetic @-1
23256
+ reference: <testLibraryFragment>::@class::A::@constructor::new
23257
+ enclosingElement3: <testLibraryFragment>::@class::A
23258
+ methods
23259
+ set @12
23260
+ reference: <testLibraryFragment>::@class::A::@method::set
23261
+ enclosingElement3: <testLibraryFragment>::@class::A
23262
+ parameters
23263
+ requiredPositional _ @21
23264
+ type: int
23265
+ returnType: dynamic
23266
+ ----------------------------------------
23267
+ library
23268
+ reference: <testLibrary>
23269
+ fragments
23270
+ <testLibraryFragment>
23271
+ element: <testLibrary>
23272
+ classes
23273
+ class A @6
23274
+ reference: <testLibraryFragment>::@class::A
23275
+ element: <testLibraryFragment>::@class::A#element
23276
+ constructors
23277
+ synthetic <null-name>
23278
+ reference: <testLibraryFragment>::@class::A::@constructor::new
23279
+ element: <testLibraryFragment>::@class::A::@constructor::new#element
23280
+ methods
23281
+ set @12
23282
+ reference: <testLibraryFragment>::@class::A::@method::set
23283
+ element: <testLibraryFragment>::@class::A::@method::set#element
23284
+ formalParameters
23285
+ _ @21
23286
+ element: <testLibraryFragment>::@class::A::@method::set::@parameter::_#element
23287
+ classes
23288
+ class A
23289
+ firstFragment: <testLibraryFragment>::@class::A
23290
+ constructors
23291
+ synthetic new
23292
+ firstFragment: <testLibraryFragment>::@class::A::@constructor::new
23293
+ methods
23294
+ set
23295
+ firstFragment: <testLibraryFragment>::@class::A::@method::set
23296
+ formalParameters
23297
+ requiredPositional _
23298
+ type: int
23299
+ ''');
23300
+ }
23301
+
23125
23302
test_class_setter_native() async {
23126
23303
var library = await buildLibrary('''
23127
23304
class C {
0 commit comments