dart-lang / dart-lang/native

ObjC: Class hierarchy should be duplicated in generated Dart code.

Open
#266 3 comments 0 reactions 0 assignees View on GitHub
lang-objective_c package:ffigen type-bug
Dominant language
Dart
Stars
275
Forks
144
Avg merge
2d 10h
Merged PRs (30d)
47

Description

Objective-C interfaces are converted to Dart classes that extend _ObjCWrapper e.g.

```
class NSString extends _ObjCWrapper {
```

Instead, they should extend their actual superclass e.g.

```
class NSString extends NSObject {
```

Otherwise `NSString` cannot be passed when `NSObject` is expected.

FYI, `castFrom` can be used as a workaround.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.