-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VER] Bump up Swift compiler version to 5.7.1 to follow Apple's policy (
#140) * [VER] Bump up Swift compiler version to 5.7.1 * [MOD] Modified swiftwasm version to use over 5.7.0 package
- Loading branch information
Showing
7 changed files
with
138 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// swift-tools-version: 5.6 | ||
// swift-tools-version: 5.7.1 | ||
|
||
import PackageDescription | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,3 @@ | ||
#if swift(>=5.7) | ||
// MARK: swift(>=5.7) | ||
|
||
func _liveValue(_ key: Any.Type) -> Any? { | ||
(key as? any DependencyKey.Type)?.liveValue | ||
} | ||
#else | ||
// MARK: - | ||
// MARK: swift(<5.7) | ||
|
||
private enum Witness<T> {} | ||
|
||
func _liveValue(_ key: Any.Type) -> Any? { | ||
func open<T>(_: T.Type) -> Any? { | ||
(Witness<T>.self as? AnyDependencyKey.Type)?.liveValue | ||
} | ||
return _openExistential(key, do: open) | ||
} | ||
|
||
protocol AnyDependencyKey { | ||
static var liveValue: Any { get } | ||
} | ||
|
||
extension Witness: AnyDependencyKey where T: DependencyKey { | ||
static var liveValue: Any { T.liveValue } | ||
} | ||
#endif | ||
func _liveValue(_ key: Any.Type) -> Any? { | ||
(key as? any DependencyKey.Type)?.liveValue | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.