mirror of
https://github.com/apple/swift.git
synced 2026-10-18 17:49:23 +02:00
Reproducer for a cycle warning during iterator conformance derivation. The cycle requires three structural properties: 1. A class-template iterator with a free-function operator== 2. An unrelated nested class with a member operator== 3. The nested class's parent has a field of a different specialization of the same iterator template When all three are present, a module-wide operator== scan during conformance derivation for one specialization can re-enter a mid-import context for the other, triggering a cycle warning.
11 lines
360 B
Swift
11 lines
360 B
Swift
// Verify that importing a module where an unrelated nested class has its own
|
|
// operator== does not produce a cycle warning during iterator conformance
|
|
// derivation.
|
|
|
|
// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=default -Xcc -std=c++17
|
|
// expected-no-diagnostics
|
|
|
|
import IteratorCycleUnrelatedOperator
|
|
|
|
typealias X = llvm.R
|