Skip to content

[SR-13260] Swift 5.3 allow unavailable api in for in where #55700

@swift-ci

Description

@swift-ci
Previous ID SR-13260
Radar rdar://problem/65903005
Original Reporter miku1958 (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Xcode 12 beta

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 09260e3af0011e84965fb28941ce32c2

Issue Description:

code like

let animators = [UIViewPropertyAnimator]()
for animator in animators where !animator.isRunning && !animator.pausesOnCompletion { // Xcode 11, error: 'pausesOnCompletion' is only available in iOS 11.0 or newer
    animator.continueAnimation(withTimingParameters: nil, durationFactor: 1)
}

can build succuss in Xcode 12 beta even the deployment target is iOS 10, but it is an error in Xcode 11
You can test the project in Xcode 11 and 12

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions