mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
20 lines
391 B
Swift
20 lines
391 B
Swift
// RUN: %target-swift-frontend -typecheck -swift-version 6 %s -verify
|
|
// REQUIRES: executable_test
|
|
// REQUIRES: OS=wasip1
|
|
|
|
import WASILibc
|
|
|
|
// errno is a global thread-local variable, so it should be accessible
|
|
// from any context.
|
|
|
|
enum TestErrno {
|
|
static func testSyncContext() {
|
|
_ = errno
|
|
errno = 0
|
|
}
|
|
static func testAsyncContext() async {
|
|
_ = errno
|
|
errno = 0
|
|
}
|
|
}
|