Files
swift-mirror/test/Serialization/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
727 B
Swift

// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/struct_with_operators.swift
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/alias.swift -module-name has_alias
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/xref_distraction.swift
// RUN: %target-swift-frontend -emit-module -o %t -I %t %S/Inputs/has_xref.swift
// RUN: llvm-bcanalyzer %t/has_xref.swiftmodule | %FileCheck %s
// RUN: %target-swift-frontend -emit-silgen -I %t %s > /dev/null
// CHECK-NOT: UnknownCode
import xref_distraction
import has_xref
numeric(42)
conditional(true)
conditional2(true)
longInt(42)
numericArray([42])
func incr<T: ExtraIncrementable>(_ x: T) {}
incr(SpecialInt())