Files
swift-mirror/test/Concurrency/sendable_cycle.swift
Robert Widmann 847930bfb7 Don't Force the Interface Type While Checking Sendable
Asking for Sendable conformances on this path is going to lead to
a traversal of the stored properties of the type. If there is an
interface type computation ongoing, as is very likely the case, this
traversal can wind up causing a cycle when it forces the interface type
of a member once again.

Request only the non-structural conformances to break the cycle.

rdar://77189542
2021-04-29 13:11:32 -07:00

11 lines
212 B
Swift

// RUN: %target-typecheck-verify-swift %S/Inputs/sendable_cycle_other.swift -enable-experimental-concurrency
// REQUIRES: concurrency
struct Bar {
lazy var foo = {
self.x()
}
func x() -> Int { 42 }
}