Skip to content

Compiler crash when evaluating key path in a generic type #85110

@dlbuckley

Description

@dlbuckley

Description

I've encountered an issue which results in what appears to be a compiler crash. I've included a sample project to illustrate the problem and the workaround. I've tried this on Xcode 26.0 and the latest beta 3 of Xcode 26.1 which includes swift version 6.2.1.4.6.

The issue seems to stem from using a key path of an embedded type within a parent generic type. The example does use TCA which includes some macro usage so that would also be the culprit.

Image

Reproduction

See the attached sample project.

Expected behavior

To show the correct error.

Environment

swift-driver version: 1.127.14.1 Apple Swift version 6.2.1 (swiftlang-6.2.1.4.6 clang-1700.4.4.1)
Target: arm64-apple-macosx26.0

  • the version released in Xcode 26.0

Additional information

CompilerCrashExample.zip

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.concurrencyFeature: umbrella label for concurrency language featuresfailed to produce diagnosticBug → internal error: Failed to produce diagnostic for expressionkey pathsFeature: key paths (both native and Objective-C)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions