Files
swift-mirror/test/Serialization/Inputs/has_xref.swift
Jordan Rose 3639343c53 [Serialization] Distinguish between protocol/extension for types too. (#7794)
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
2017-02-28 10:36:46 -08:00

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 {}