Skip to content

Failed to produce diagnostic for expression (TableColumn with erroneous key path) #63481

Open
@JetForMe

Description

@JetForMe

Description

The enclosed project contains a compile-time error at ContentView.swift:92: the key path is incorrect (among other things, executableInfo is an optional value).

Modifying the erroneous expression to \.executableInfo?.path causes the type checker to time out: "The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions."

Steps to reproduce

Build the attached project with the specified tools.

Expected behavior

A diagnostic indicating what's wrong with the key path.

Environment

$ /Library/Developer/Toolchains/swift-5.8-DEVELOPMENT-SNAPSHOT-2023-02-01-a.xctoolchain/usr/bin/swiftc -version
Apple Swift version 5.8-dev (LLVM 44d4f9d4b49845f, Swift 74ab40be0d09183)
Target: arm64-apple-macosx13.0

$ xcodebuild -version
Xcode 14.2
Build version 14C18

Deployment target: macOS 13.1

Exorcist.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselffailed to produce diagnosticBug → internal error: Failed to produce diagnostic for expressionkey pathsFeature: key paths (both native and Objective-C)result buildersFeature: Result buildersswift 5.9type checkerArea → compiler: Semantic analysis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions