Fix missing return lint (flutter/engine#9246)

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.
This commit is contained in:
Chris Bracken
2019-06-11 10:49:06 -07:00
committed by GitHub
parent 888d951d19
commit 097742c13c
2 changed files with 3 additions and 1 deletions

View File

@@ -1,2 +1,2 @@
Signature: ad6590b867473860a1e6b08bf9e98667
Signature: 5b10e36374c7d600de6c632fde955f7d

View File

@@ -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:
@@ -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;