Files
swift-mirror/test/SILGen/Inputs/specialize_attr_module2.swift
Arnold Schwaighofer c2b2f1331f SIL representation
2021-10-06 04:54:49 -07:00

39 lines
1.1 KiB
Swift

import A
extension PublicThing {
@_specialize(exported: true, kind: full, target: doStuffWith(_:), where T == Int)
@_specialize(exported: true, kind: full, target: doStuffWith(_:), availability: macOS 10.50, *; where T == Int16)
public func specializedoStuff2(_ t: T) {}
}
@_specializeExtension
extension InternalThing {
@_specialize(exported: true, target:doStuffWith(boxed:), where T == Int)
public func specializedDoStuffWith2(_ t: BoxedThing<T>) {}
}
@_specializeExtension
extension InternalThing2 {
public var specializeComputedZ : T {
@_specialize(exported: true, target: computedZ, where T == Int)
_modify {
fatalError("don't call")
}
@_specialize(exported: true, target: computedZ, where T == Int)
_read {
fatalError("don't call")
}
}
public subscript(specialized i: Int) -> T {
@_specialize(exported: true, target: subscript(_:), where T == Int)
get {
fatalError("don't call")
}
@_specialize(exported: true, target: subscript(_:), where T == Int)
set {
fatalError("don't call")
}
}
}