Skip to content

Commit

Permalink
Fix missing return lint (flutter#9246)
Browse files Browse the repository at this point in the history
A recent Dart roll improved the detection of missing return statements.
Since we enforce that all enum values must be covered in switch
statements, this isn't an issue, but we add a return to fix the lint.
  • Loading branch information
cbracken committed Jun 11, 2019
1 parent 4d68474 commit 10a3ab0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ci/licenses_golden/tool_signature
@@ -1,2 +1,2 @@
Signature: ad6590b867473860a1e6b08bf9e98667
Signature: 5b10e36374c7d600de6c632fde955f7d

2 changes: 2 additions & 0 deletions tools/licenses/lib/licenses.dart
Expand Up @@ -176,6 +176,7 @@ abstract class License implements Comparable<License> {
if (!reformatted)
body = _reformat(body);
final License result = _registry.putIfAbsent(body, () {
assert(type != null);
switch (type) {
case LicenseType.bsd:
case LicenseType.mit:
Expand All @@ -200,6 +201,7 @@ abstract class License implements Comparable<License> {
case LicenseType.libpng:
return BlankLicense._(body, type, origin: origin);
}
return null;
});
assert(result.type == type);
return result;
Expand Down

0 comments on commit 10a3ab0

Please sign in to comment.