mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Somehow, protocol conformance checking didn't actually care that this was missing... Swift SVN r21898
46 lines
1.8 KiB
Swift
46 lines
1.8 KiB
Swift
// RUN: rm -rf %t/clang-module-cache
|
|
// RUN: %swift -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 -sdk %S/Inputs %s -emit-silgen | FileCheck %s
|
|
|
|
import gizmo
|
|
|
|
|
|
// CHECK-DAG: sil shared @_TFOSC16NSRuncingOptionsCfMS_FT8rawValueSi_GSqS__
|
|
// CHECK-DAG: sil shared @_TFOSC16NSRuncingOptionsg8rawValueSi
|
|
// CHECK-DAG: sil shared @_TFOSC16NSRuncingOptionsg9hashValueSi
|
|
|
|
// CHECK-DAG: sil shared @_TF5gizmooi2eeFTOSC16NSRuncingOptionsS0__Sb
|
|
|
|
// CHECK-DAG: sil shared [transparent] @_TFOSC16NSRuncingOptions5MinceFMS_S_
|
|
// CHECK-DAG: sil shared [transparent] @_TFOSC16NSRuncingOptions12QuinceSlicedFMS_S_
|
|
// CHECK-DAG: sil shared [transparent] @_TFOSC16NSRuncingOptions15QuinceJuliennedFMS_S_
|
|
// CHECK-DAG: sil shared [transparent] @_TFOSC16NSRuncingOptions11QuinceDicedFMS_S_
|
|
|
|
var runcing: NSRuncingOptions = .Mince
|
|
|
|
var raw = runcing.rawValue
|
|
var eq = runcing == .QuinceSliced
|
|
var hash = runcing.hashValue
|
|
|
|
func testEm<E: Equatable>(x: E, y: E) {}
|
|
func hashEm<H: Hashable>(x: H) {}
|
|
func rawEm<R: RawRepresentable>(x: R) {}
|
|
|
|
testEm(NSRuncingOptions.Mince, .QuinceSliced)
|
|
hashEm(NSRuncingOptions.Mince)
|
|
rawEm(NSRuncingOptions.Mince)
|
|
rawEm(NSFungingMask.Asset)
|
|
|
|
protocol Bub {}
|
|
|
|
extension NSRuncingOptions: Bub {}
|
|
|
|
// CHECK-DAG: sil_witness_table shared NSRuncingOptions: RawRepresentable module gizmo
|
|
// CHECK-DAG: sil_witness_table shared NSRuncingOptions: Equatable module gizmo
|
|
// CHECK-DAG: sil_witness_table shared NSRuncingOptions: Hashable module gizmo
|
|
// CHECK-DAG: sil_witness_table shared NSFungingMask: RawRepresentable module gizmo
|
|
|
|
// CHECK-DAG: sil shared @_TTWOSC16NSRuncingOptionsSs16RawRepresentableFS0_CUS0__U__fMQPS0_FT8rawValueQS1_8RawValue_GSqS1__
|
|
|
|
// Extension conformances get public linkage as normal.
|
|
// CHECK-DAG: sil_witness_table NSRuncingOptions: Bub module objc_enum
|