You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When in "Manually Run" mode, Playgrounds doesn't support computed variables. The declaration is interpreted as separate from the definition, and since the REPL doesn't allow for declarations without initial declarations, computed variables produce crashes.
The following code:
import UIKit
let controller = UIViewController()
var view: UIView { return controller.view }
crashes with the following error message:
error: Scratchpad.playground:6:1: error: variables currently must have an initial value when entered at the top level of the REPL
The text was updated successfully, but these errors were encountered:
Attachment: Download
Environment
Xcode 10 (10A255) Playgrounds
Additional Detail from JIRA
md5: 6dc84062c35c2cac81188c23b749b16c
Issue Description:
When in "Manually Run" mode, Playgrounds doesn't support computed variables. The declaration is interpreted as separate from the definition, and since the REPL doesn't allow for declarations without initial declarations, computed variables produce crashes.
The following code:
crashes with the following error message:
error: Scratchpad.playground:6:1: error: variables currently must have an initial value when entered at the top level of the REPL
The text was updated successfully, but these errors were encountered: