Files
swift-mirror/test/SynthesizeInterfaceTool/test-swift-extension-printing.swift
Pavel Yaskevich 700d9fd669 [IDE] Avoid printing some Swift extensions twice in mixed source frameworks
`printModuleInterfaceDecl` printes extensions right after the type
they are associated with is printed. Extensions associated with a
type that appears in the "target" module shouldn't be added to
`SwiftDecls` because that would lead to double printing them.
2025-11-13 15:03:35 -08:00

21 lines
494 B
Swift

// RUN: %target-swift-synthesize-interface -module-name TestExt -F %S/Inputs/Frameworks -o - | %FileCheck %s
// REQUIRES: OS=macosx && CPU=arm64
// CHECK: open class MyType
// CHECK: extension MyType {
// CHECK: public struct MyInnerType {
// CHECK: public func test()
// CHECK: }
// CHECK: }
// CHECK-NOT: public struct MyInnerType
// CHECK: extension Int {
// CHECK: public struct OtherInnerType {
// CHECK: }
// CHECK: }
// CHECK-NOT: public struct MyInnerType