mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
67c4be0ac2
Fixes a regression introduced with https://github.com/swiftlang/swift/pull/83167
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
|
|
}
|
|
}
|