Files
swift-mirror/test/Serialization/renamed-cycle.swift
Allan Shortlidge 7789ce85e1 Serialization: Stop serializing cached rename decls.
Rename decls are typically derived from the rename strings attached to a
`@available` attributes. It shouldn't be necessary to serialize the cached
rename decls since they can be rederived. The only decls that have rename decls
and don't have reanme strings are synthesized by ClangImporter and don't get
serialized.
2024-11-29 10:35:02 -05:00

31 lines
608 B
Swift

// RUN: %empty-directory(%t)
// RUN: split-file %s %t
// RUN: %target-swift-frontend -emit-module %t/Library.swift -o %t/Library.swiftmodule
// RUN: %target-swift-frontend -emit-module %t/Renamed.swift -o %t/Renamed.swiftmodule -I %t/
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t/
//--- Library.swift
public struct HasRename {
public init(new: Int) { }
}
//--- Renamed.swift
import Library
extension HasRename {
@available(*, renamed: "init(new:)")
public init(old: Int) {
self.init(new: old)
}
}
//--- Client.swift
import Library
import Renamed
_ = HasRename(old: 0)