Skip to content

NSError** params have unexpected generic private type #1864

Open
@stuartmorgan-g

Description

@stuartmorgan-g

Generating NSBundle gives me the following methods:

  bool preflightAndReturnError_(
      ffi.Pointer<ffi.Pointer<objc.ObjCObject>> error) {
    return _objc_msgSend_1dom33q(
        this.ref.pointer, _sel_preflightAndReturnError_, error);
  }

  /// loadAndReturnError:
  bool loadAndReturnError_(ffi.Pointer<ffi.Pointer<objc.ObjCObject>> error) {
    return _objc_msgSend_1dom33q(
        this.ref.pointer, _sel_loadAndReturnError_, error);
  }

For clients this translates to Pointer<Pointer<_ObjCObject>>. This has all of the problems described in #1861 (and #1862 and #1863); I would expect this to be a public generic NSObject type rather than a private one if it's generic.

However, it also seems to be unexpectedly generic. I thought that was because I didn't include NSError in my ffi config, so I added it to avoid this problem... but it didn't; the type was still the same. I would expect the inner type to be NSError.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions