Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-9079] Playgrounds in "Manually Run" mode doesn't support computed variables #64

Closed
HarshilShah opened this issue Oct 25, 2018 · 3 comments

Comments

@HarshilShah
Copy link

Previous ID SR-9079
Radar rdar://problem/45588366
Original Reporter @HarshilShah
Type Bug
Status Closed
Resolution Done

Attachment: Download

Environment

Xcode 10 (10A255) Playgrounds

Additional Detail from JIRA
Votes 0
Component/s Xcode Playground Support
Labels Bug
Assignee None
Priority Medium

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:

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

@belkadan
Copy link

@swift-ci create

@AnnaZaks
Copy link
Mannequin

AnnaZaks mannequin commented Jul 23, 2019

This was addressed by apple/swift-lldb@1fa3bb2
@HarshilShah, Could you verify if the problem is fixed and if so move the JIRA to "Closed"?

Thanks!
Anna

@HarshilShah
Copy link
Author

This issue has been fixed and now works as expected, thank you!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from swiftlang/swift May 9, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants