Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Add NSExpression syntax for conditionals with multiple branches #11007

Closed

Description

@1ec5

The NSExpression-based property value implementation in #10726 should support a more compact syntax for conditionals with multiple branches. Currently, an NSExpression containing a nested TERNARY gets converted into nested case expressions, and a case expression with multiple branches gets converted into a nested TERNARY structure. At least a nested TERNARY should be converted into a flat case.

Activity

  1. added
    GL JS parity
    iOS
    macOS
    on Jan 24, 2018
  2. added this to the milestone on Jan 24, 2018
  3. 1ec5 commented on Feb 13, 2018

    @1ec5
    ContributorAuthor

    @friedbunny pointed out that +[NSExpression expressionForConditional:trueExpression:falseExpression:] is unavailable in iOS 8.x, so the proposed syntax would be even more useful for developers that need to deploy back to that version.

  4. friedbunny commented on Feb 13, 2018

    @friedbunny
    Contributor

    Indeed, besides recommending +[NSExpression expressionForConditional:trueExpression:falseExpression:] in the docs a couple times, we use it here:

    return [NSExpression expressionForConditional:conditional trueExpression:trueExpression falseExpression:falseExpression];

    and here:

    NSExpression *expression = [NSExpression expressionForConditional:conditional trueExpression:trueExpression falseExpression:falseExpression];

  5. added
    release blocker
    on Feb 20, 2018
  6. 1ec5 commented on Apr 12, 2018

    @1ec5
    ContributorAuthor

    Fixed in #11450 on the release-boba branch for iOS map SDK v4.0.0 and macOS map SDK v0.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GL JS parityiOSmacOSrelease blockerruntime styling

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions