mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
31 lines
608 B
Swift
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)
|