Skip to content

[ffigen] [objc] Incorrect code generation for NSArray differenceFromArray #2761

@brianquinlan

Description

@brianquinlan

The generated code is (ffigen 20.0):

  objc.NSOrderedCollectionDifference differenceFromArray$1(
    objc.NSArray other, {
    required objc.NSOrderedCollectionDifferenceCalculationOptions withOptions,
  }) {
    objc.checkOsVersionInternal(
      'NSArray.differenceFromArray:withOptions:',
      iOS: (false, (13, 0, 0)),
      macOS: (false, (10, 15, 0)),
    );
    final $ret = _objc_msgSend_1wtpmu7(
      object$.ref.pointer,
      _sel_differenceFromArray_withOptions_,
      other.ref.pointer,
      // The argument type 'NSOrderedCollectionDifferenceCalculationOptions' can't be assigned to the parameter type 'int'. 
      withOptions,
    );
    return objc.NSOrderedCollectionDifference.fromPointer(
      $ret,
      retain: true,
      release: true,
    );
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions