Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15742] Unreachable "these types are always canonical" executed #58019

ahoppen opened this issue Jan 17, 2022 · 1 comment

[SR-15742] Unreachable "these types are always canonical" executed #58019

ahoppen opened this issue Jan 17, 2022 · 1 comment


Copy link

@ahoppen ahoppen commented Jan 17, 2022

Previous ID SR-15742
Radar rdar://87684281
Original Reporter @ahoppen
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, FoundByStressTester
Assignee None
Priority Medium

md5: ddd1211125b9d74d76168f30e67db9b1

Issue Description:

The following test case fails with an llvm_unreachable these types are always canonical being executed.

// RUN: %sourcekitd-test -req=cursor -pos=5:36 %s -- %s

func fetch() {
  sryMap{ return try processResponse() }
  .napError{ parseError(reason: $ }

func sryMap<String>(_ transform: () throws -> String) -> SryMap<String> {

func processResponse() throws -> String { return "" }

func parseError(reason: String) {}

protocol MyError {}
extension MyError {
  func abc() -> String { return "" }

protocol MyProto {
  associatedtype Failure
extension MyProto {
  func napError(_ transform: (Self.Failure) -> Void) {}

struct SryMap<Output> : MyProto {
    typealias Failure = MyError

Bisecting determined that this was caused by #40666 (specifically commit ee331a8).

Copy link

@hborla hborla commented Jan 20, 2022

Here's the fix: #40925

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants