Files
swift-mirror/test/SILGen/arguments_as_tuple_overloads.swift
Erik Eckstein ae49b6939b Mangling: fix mangling of functions with a single empty tuple argument
For example:
	func testit(_ x: ()) -> Int
2017-04-28 16:51:34 -07:00

38 lines
836 B
Swift

// RUN: %target-swift-frontend -parse-as-library -module-name=test -emit-silgen -primary-file %s | %FileCheck %s
// Check if we mangle the following constructors and functions correctly.
public struct Pair {
// CHECK: sil @_T04test4PairVACSi_SitcfC :
public init(_ a: Int, _ b: Int) {
}
// CHECK: sil @_T04test4PairVACSi_Sit_tcfC :
public init(_ t: (Int, Int)) {
}
// CHECK: sil @_T04test4PairVAAySi_SitF :
public func test(_ a: Int, _ b: Int) {
}
// CHECK: sil @_T04test4PairVAAySi_Sit_tF :
public func test(_ t: (Int, Int)) {
}
}
// CHECK: sil @_T04testAAySi_SitF :
public func test(_ a: Int, _ b: Int) {
}
// CHECK: sil @_T04testAAySi_Sit_tF :
public func test(_ t: (Int, Int)) {
}
// CHECK: sil @_T04test3fooyyt_tF :
public func foo(_: ()) {
}
// CHECK: sil @_T04test3fooyyF :
public func foo() {
}