Files
swift-mirror/test/embedded/multi-module-debug-info.swift
Max Desiatov b589f05c10 Support untyped throws in Embedded Swift (#87617)
**Explanation**: We would like untyped throws to be available in Embedded Swift when system allocator is available.
**Scope**: limited to Embedded Swift.
**Risk**: low due to isolated scope, additive nature of the change, and no adoption of untyped throws in Embedded Swift so far.
**Testing**: added new lit tests.
**Issue**: rdar://171325402
2026-04-14 18:05:14 +01:00

36 lines
714 B
Swift

// RUN: %empty-directory(%t)
// RUN: %{python} %utils/split_file.py -o %t %s
// RUN: %target-swift-frontend -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -enable-experimental-feature Embedded -parse-as-library
// RUN: %target-swift-frontend -c -I %t %t/Main.swift -enable-experimental-feature Embedded -o /dev/null
// REQUIRES: OS=macosx || OS=linux-gnu || OS=wasip1
// REQUIRES: swift_feature_Embedded
// BEGIN MyModule.swift
public struct MyError: Error {
}
@inline(never)
public func foo<T>(_ t: T) throws {
throw MyError()
}
@inline(never)
public func callit<T>(_ t: T) {
do {
try foo(t)
} catch {
}
}
// BEGIN Main.swift
import MyModule
public func testit() {
callit(27)
}