Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Fix static methods bug
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Sep 28, 2023
1 parent a69fae5 commit 5d9c6e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/src/code_generator/objc_interface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} {
while (superType_ != null) {
for (final method in methods.values) {
final superMethod = superType_.methods[method.originalName];
if (superMethod != null) {
if (superMethod != null && !superMethod.isClass && !method.isClass) {
if (superMethod.returnType.typealiasType is! ObjCNullable &&
method.returnType.typealiasType is ObjCNullable) {
superMethod.returnType = ObjCNullable(superMethod.returnType);
Expand Down Expand Up @@ -527,10 +527,16 @@ class ObjCMethod {
originalName.startsWith('new') ||
originalName.startsWith('alloc') ||
originalName.contains(_copyRegExp);

@override
String toString() => '$returnType $originalName(${params.join(', ')})';
}

class ObjCMethodParam {
Type type;
final String name;
ObjCMethodParam(this.type, this.name);

@override
String toString() => '$type $name';
}

0 comments on commit 5d9c6e7

Please sign in to comment.