Skip to content

Crash with empty array literal expectations #82190

Open
@macguru

Description

@macguru

Description

The following code currently crashes with Swift 6.2 but did not in Swift 6.1. There is a EXC_BAD_ACCESS (code=1, address=0x0) in the macro expansion, that's why I report it here. Hope this is the right place.

Reproduction

@Test func test() {
    #expect([].first == nil)
}

Expected behavior

Should just run and report a successful test.

Environment

Xcode 26 Beta

Testing Library Version: 1070
Target Platform: arm64e-apple-macos14.0

Additional information

No response

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