mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Replace an existing flag for cross-references to member types (that wasn't getting much use) with one consistent with how we lookup values. This fixes the case where someone actually has a useful type as a member of a protocol extension, and that type gets referenced in another module; Dispatch does exactly this. Because you can currently only define typealiases in protocol extensions, not new types, there's always a workaround for someone hitting this issue: just use the underlying type. https://bugs.swift.org/browse/SR-4076
23 lines
524 B
Swift
23 lines
524 B
Swift
import has_alias
|
|
@_exported import struct_with_operators
|
|
|
|
public func numeric(_ x: MyInt64) {}
|
|
public func conditional(_ x: AliasWrapper.Boolean) {}
|
|
public func conditional2(_ x: ProtoWrapper.Boolean) {}
|
|
public func longInt(_ x: Int.EspeciallyMagicalInt) {}
|
|
|
|
public func numericArray(_ x: IntSlice) {}
|
|
|
|
|
|
public protocol ExtraIncrementable {
|
|
prefix func +++(base: inout Self)
|
|
}
|
|
|
|
extension SpecialInt : ExtraIncrementable {}
|
|
|
|
public protocol DefaultInitializable {
|
|
init()
|
|
}
|
|
|
|
extension SpecialInt : DefaultInitializable {}
|