fix Picture.toImage return type check and api conform test. (flutter/engine#9685)

This commit is contained in:
Jonah Williams 2019-07-06 00:45:07 -07:00 committed by GitHub
parent 6aae24e6b5
commit 07d7550d80

View File

@ -148,6 +148,15 @@ void main() {
'${uiParam.identifier.name} is named, but not in lib/stub_ui/ui.dart.');
}
}
// check return type.
if (uiMethod.returnType?.toString() != webMethod.returnType?.toString()) {
// allow dynamic in web implementation.
if (webMethod.returnType?.toString() != 'dynamic') {
failed = true;
print('Warning: lib/ui/ui.dart $className.$methodName return type'
'${uiMethod.returnType?.toString()} is not the same as in lib/stub_ui/ui.dart.');
}
}
}
}
if (failed) {
@ -158,8 +167,6 @@ void main() {
exit(0);
}
void _checkParameters() {}
// Collects all public classes defined by the part files of [unit].
void _collectPublicClasses(CompilationUnit unit,
Map<String, ClassDeclaration> destination, String root) {