Skip to content

Commit 3dc27a5

Browse files
srawlinscommit-bot@chromium.org
authored andcommitted
Migrator: Add a failing test for #42327
Bug: #42327 Change-Id: I5ac4dbaf95efdc7b54ea4009b78187e519cac92d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151094 Reviewed-by: Mike Fairhurst <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 67539c2 commit 3dc27a5

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

pkg/nnbd_migration/lib/src/edge_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2638,7 +2638,7 @@ class EdgeBuilder extends GeneralizingAstVisitor<DecoratedType>
26382638
if (name != null) {
26392639
parameterType = calleeType.namedParameters[name];
26402640
if (parameterType == null) {
2641-
// TODO(paulberry)
2641+
// TODO(#42327)
26422642
_unimplemented(expression, 'Missing type for named parameter');
26432643
}
26442644
suppliedNamedParameters.add(name);

pkg/nnbd_migration/test/api_test.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,22 @@ void test(C c) {
207207
await _checkSingleFileChanges(content, expected);
208208
}
209209

210+
@FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/42327')
211+
// When fixing this issue, probably convert this to an edge builder test.
212+
Future<void> test_migratedMethod_namedParameter() async {
213+
var content = '''
214+
void f(Iterable<int> a) {
215+
a.toList(growable: false);
216+
}
217+
''';
218+
var expected = '''
219+
void f(Iterable<int> a) {
220+
a.toList(growable: false);
221+
}
222+
''';
223+
await _checkSingleFileChanges(content, expected);
224+
}
225+
210226
Future<void> test_add_required() async {
211227
var content = '''
212228
int f({String s}) => s.length;

0 commit comments

Comments
 (0)