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:
@@ -1,2 +1,2 @@
|
||||
Signature: ad6590b867473860a1e6b08bf9e98667
|
||||
Signature: 5b10e36374c7d600de6c632fde955f7d
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user