Last active
October 12, 2022 16:45
-
-
Save kkebo/72138961ac3bff48e042b80b6ca63478 to your computer and use it in GitHub Desktop.
Xcode Previews 上でプレビューのプロセスがクラッシュするコード (実機だと問題なし) (macOS 12.3 & Xcode 13.3 や iPadOS 15.4 & Swift Playgrounds 4.0.2 で再現することを確認) (Swift 5.7 で修正)
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
import SwiftUI | |
// 再現する型: URL, URLError, UUID, Date, Measurement, Locale, some SwiftUI.View | |
// 再現しない型: String, [Int], [String: Int], some StringProtocol, DispatchQueue, Bundle, Data, DateFormatter, URLSession, JSONEncoder, NSNumber, CGFloat, Decimal, SwiftUI.Text | |
func foo() async -> URL { | |
.init(fileURLWithPath: "/") | |
} | |
struct ContentView: View { | |
var body: some View { | |
Button("Press Me") { | |
Task { _ = await foo() } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment