Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Add missed case for prefer_collection_literals #3705

Merged
merged 3 commits into from
Sep 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions test/rules/prefer_collection_literals_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,19 @@ void f() {
error(CompileTimeErrorCode.UNDEFINED_FUNCTION, 44, 15),
]);
}

@failingTest
test_closure_returns_linkedHashSet() async {
await assertDiagnostics(r'''
import 'dart:collection';

void a(Set<int> Function() f) {}

void c() {
a(() => LinkedHashSet<int>());
}
''', [
lint(82, 20),
]);
}
}