Skip to content

Expected identifier; 'nullptr' is a keyword in Objective-C++ #2357

@schmidt9

Description

@schmidt9

I use com.soywiz.korge:korge-core v6.0.0 in KMP project and I get error Expected identifier; 'nullptr' is a keyword in Objective-C++ in generated header in Objective C++/Swift project for methods:

- (double)maxOrElseNil:(double)nil __attribute__((swift_name("maxOrElse(nil:)")));
- (double)minOrElseNil:(double)nil __attribute__((swift_name("minOrElse(nil:)")));
Image

References:
https://github.com/korlibs/korlibs-math/blob/ace56000cd8a040245f7132260c167122c2a8a2d/korlibs-math/src/korlibs/math/ArrayExt.kt#L13
https://dokka.korge.org/korge-foundation/korlibs.math/max-or-else.html

Possible solution:
rename declarations
https://kotlinlang.org/docs/native-objc-interop.html#change-declaration-names

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Pending

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions