Skip to content

Commit

Permalink
Fix analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Nov 19, 2024
1 parent d2e12b5 commit 82f41c5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class InitializerDeclaration
@override
bool isOverriding;

@override
bool isFailable;

@override
Expand Down
8 changes: 4 additions & 4 deletions pkgs/swift2objc/lib/src/parser/_core/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ String parseSymbolName(Json symbolJson) {
}

bool parseSymbolHasObjcAnnotation(Json symbolJson) {
return symbolJson['declarationFragments'].any(
(json) => matchFragment(json, 'attribute', '@objc'));
return symbolJson['declarationFragments']
.any((json) => matchFragment(json, 'attribute', '@objc'));
}

bool parseIsOverriding(Json symbolJson) {
return symbolJson['declarationFragments'].any(
(json) => matchFragment(json, 'keyword', 'override'));
return symbolJson['declarationFragments']
.any((json) => matchFragment(json, 'keyword', 'override'));
}

ReferredType parseTypeFromId(String typeId, ParsedSymbolgraph symbolgraph) {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/swift2objc/lib/src/transformer/_core/unique_namer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import '../../ast/_core/interfaces/compound_declaration.dart';
class UniqueNamer {
final Set<String> _usedNames;

UniqueNamer([Iterable<String> usedNames = const <String>[]]) :
_usedNames = usedNames.toSet();
UniqueNamer([Iterable<String> usedNames = const <String>[]])
: _usedNames = usedNames.toSet();

UniqueNamer.inCompound(CompoundDeclaration compoundDeclaration)
: _usedNames = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ List<String> _generateInitializerStatements(
final originalParam = originalInitializer.params[i];
final transformedParam = transformedInitializer.params[i];

final transformedParamName =
localNamer.makeUnique(transformedParam.internalName ?? transformedParam.name);
final transformedParamName = localNamer
.makeUnique(transformedParam.internalName ?? transformedParam.name);

final (unwrappedParamValue, unwrappedType) = maybeUnwrapValue(
transformedParam.type,
Expand Down

0 comments on commit 82f41c5

Please sign in to comment.