diff --git a/lib/src/code_generator/objc_interface.dart b/lib/src/code_generator/objc_interface.dart index d801628b..8bc0cdbc 100644 --- a/lib/src/code_generator/objc_interface.dart +++ b/lib/src/code_generator/objc_interface.dart @@ -293,15 +293,18 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { for (final method in methods.values) { final superMethod = superType_.methods[method.originalName]; if (superMethod != null) { - if (superMethod.returnType.typealiasType is! ObjCNullable && method.returnType.typealiasType is ObjCNullable) { + if (superMethod.returnType.typealiasType is! ObjCNullable && + method.returnType.typealiasType is ObjCNullable) { superMethod.returnType = ObjCNullable(superMethod.returnType); } - final numArgs = method.params.length < superMethod.params.length ? - method.params.length : superMethod.params.length; + final numArgs = method.params.length < superMethod.params.length + ? method.params.length + : superMethod.params.length; for (int i = 0; i < numArgs; ++i) { final param = method.params[i]; final superParam = superMethod.params[i]; - if (superParam.type.typealiasType is ObjCNullable && param.type.typealiasType is! ObjCNullable) { + if (superParam.type.typealiasType is ObjCNullable && + param.type.typealiasType is! ObjCNullable) { param.type = ObjCNullable(param.type); } } diff --git a/test/native_objc_test/nullable_inheritance_test.dart b/test/native_objc_test/nullable_inheritance_test.dart index 429d96a3..fd3052ce 100644 --- a/test/native_objc_test/nullable_inheritance_test.dart +++ b/test/native_objc_test/nullable_inheritance_test.dart @@ -21,7 +21,8 @@ void main() { group('Nullable inheritance', () { setUpAll(() { logWarnings(); - final dylib = File('test/native_objc_test/nullable_inheritance_test.dylib'); + final dylib = + File('test/native_objc_test/nullable_inheritance_test.dylib'); verifySetupFile(dylib); lib = NullableInheritanceTestObjCLibrary( DynamicLibrary.open(dylib.absolute.path)); diff --git a/test/native_objc_test/nullable_test.dart b/test/native_objc_test/nullable_test.dart index 6daa18f6..9aed94e1 100644 --- a/test/native_objc_test/nullable_test.dart +++ b/test/native_objc_test/nullable_test.dart @@ -61,8 +61,7 @@ void main() { group('Not-nullable arguments', () { test('Not null', () { - expect( - NullableInterface.isNullWithNotNullableNSObjectPtrArg_(lib, obj), + expect(NullableInterface.isNullWithNotNullableNSObjectPtrArg_(lib, obj), false); }); });