@@ -3357,6 +3357,25 @@ class R {}
3357
3357
assertNotSuggested ('Object' );
3358
3358
}
3359
3359
3360
+ @failingTest
3361
+ Future <void > test_functionExpression_expressionBody () async {
3362
+ // This test fails because the OpType at the completion location doesn't
3363
+ // allow for functions that return `void`. But because the expected return
3364
+ // type is `dynamic` we probably want to allow it.
3365
+ addTestSource ('''
3366
+ void f() {
3367
+ g(() => ^);
3368
+ }
3369
+ void g(dynamic Function() h) {}
3370
+ ''' );
3371
+ await computeSuggestions ();
3372
+
3373
+ expect (replacementOffset, completionOffset);
3374
+ expect (replacementLength, 0 );
3375
+ assertSuggestFunction ('f' , 'void' );
3376
+ assertSuggestFunction ('g' , 'void' );
3377
+ }
3378
+
3360
3379
Future <void > test_functionExpression_parameterList () async {
3361
3380
addTestSource ('''
3362
3381
var c = <T>(^) {};
@@ -5187,6 +5206,20 @@ class B extends A {m() {^}}
5187
5206
assertSuggestMethod ('m' , 'B' , null );
5188
5207
}
5189
5208
5209
+ @failingTest
5210
+ Future <void > test_parameterList_genericFunctionType () async {
5211
+ // This test fails because we don't suggest `void` as the type of a
5212
+ // parameter, but we should for the case of `void Function()`.
5213
+ addTestSource ('''
5214
+ void f(^) {}
5215
+ ''' );
5216
+ await computeSuggestions ();
5217
+
5218
+ expect (replacementOffset, completionOffset);
5219
+ expect (replacementLength, 0 );
5220
+ assertSuggest ('void' );
5221
+ }
5222
+
5190
5223
Future <void > test_parameterName_excludeTypes () async {
5191
5224
addTestSource ('m(int ^) {}' );
5192
5225
await computeSuggestions ();
0 commit comments