@@ -243,7 +243,48 @@ class A {
243
243
''' ));
244
244
}
245
245
246
- void test_superConstructorParameter_fieldFormal () async {
246
+ void test_fieldFormalParameter_referenced () async {
247
+ var library = await bootPackageWithLibrary ('''
248
+ class C {
249
+ int p;
250
+ /// Text [p].
251
+ C(this.p);
252
+ }
253
+ ''' );
254
+ var cConstructor = library.classes.named ('C' ).constructors.named ('C' );
255
+ // There is no link, but also no wrong link or crash.
256
+ expect (cConstructor.documentationAsHtml, '<p>Text <code>p</code>.</p>' );
257
+ }
258
+
259
+ void test_fieldFormalParameter_referenced_wildcard () async {
260
+ var library = await bootPackageWithLibrary ('''
261
+ class C {
262
+ int _;
263
+ /// Text [_].
264
+ C(this._);
265
+ }
266
+ ''' );
267
+ var cConstructor = library.classes.named ('C' ).constructors.named ('C' );
268
+ // There is no link, but also no wrong link or crash.
269
+ expect (cConstructor.documentationAsHtml, '<p>Text <code>_</code>.</p>' );
270
+ }
271
+
272
+ void test_superParameter_referenced_wildcard () async {
273
+ var library = await bootPackageWithLibrary ('''
274
+ class C {
275
+ C(int _);
276
+ }
277
+ class D extends C {
278
+ /// Text [_].
279
+ D(super._) {}
280
+ }
281
+ ''' );
282
+ var dConstructor = library.classes.named ('D' ).constructors.named ('D' );
283
+ // There is no link, but also no wrong link or crash.
284
+ expect (dConstructor.documentationAsHtml, '<p>Text <code>_</code>.</p>' );
285
+ }
286
+
287
+ void test_superParameter_fieldFormal () async {
247
288
var library = await bootPackageWithLibrary ('''
248
289
class C {
249
290
int f;
@@ -265,7 +306,7 @@ class D extends C {
265
306
''' ));
266
307
}
267
308
268
- void test_superConstructorParameter_isSubtype () async {
309
+ void test_superParameter_isSubtype () async {
269
310
var library = await bootPackageWithLibrary ('''
270
311
class C {
271
312
C.positionalNum(num g);
@@ -286,7 +327,7 @@ class D extends C {
286
327
''' ));
287
328
}
288
329
289
- void test_superConstructorParameter_superParameter () async {
330
+ void test_superParameter_superParameter () async {
290
331
var library = await bootPackageWithLibrary ('''
291
332
class C {
292
333
C.requiredPositional(int a);
0 commit comments