Post

Replies

Boosts

Views

Activity

Playgrounds aborts w/ Shape
I have a trivial playground that aborts in Swift Playgrounds inside the Shape path generation. It used to work on macOS 10.15.7 but fails after upgrading to macOS 11. It's always failed in Xcode playground. Thoughts/suggestions? import PlaygroundSupport import SwiftUI struct MyFrame : Shape {     func path(in rect: CGRect) -> Path {         return Path(rect)&#9;// <== Abort() called here     } } struct MyView: View {     var body: some View {         VStack {             Text("Hello, world!")             ZStack {                 Rectangle()                     .stroke(lineWidth: 2.0)            &#9;&#9; MyFrame()                &#9;&#9; .stroke(lineWidth: 2.0)             }         }         .padding(EdgeInsets.init(top: 20.0, leading: 20.0, bottom: 20.0, trailing: 20.0))     } } PlaygroundPage.current.needsIndefiniteExecution = true PlaygroundPage.current.setLiveView(MyView())
3
0
1k
Dec ’20