mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This may involve changing the linkage of the specialized function. If called from a serialized function we cannot make the specialized function shared and non-serialized. The only other option is to keep the original function's linkage. rdar://121675461
20 lines
380 B
Swift
20 lines
380 B
Swift
// RUN: %target-swift-frontend -emit-ir %s -enable-experimental-feature Embedded -o /dev/null
|
|
|
|
// REQUIRES: swift_in_compiler
|
|
// REQUIRES: VENDOR=apple
|
|
// REQUIRES: OS=macosx
|
|
|
|
// Check that this doesn't crash the compiler in embedded mode.
|
|
|
|
public func foo<T>(_ t: T) -> T {
|
|
t
|
|
}
|
|
|
|
public func testit(_ x: Int = foo(27)) -> Int {
|
|
x
|
|
}
|
|
|
|
public func callit() -> Int {
|
|
testit()
|
|
}
|