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-15220] Implicit local property wrappers require semicolons #57542

Closed
swift-ci opened this issue Sep 21, 2021 · 1 comment · Fixed by #61036
Closed

[SR-15220] Implicit local property wrappers require semicolons #57542

swift-ci opened this issue Sep 21, 2021 · 1 comment · Fixed by #61036
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers parser Area → compiler: The legacy C++ parser property wrappers Feature: property wrappers

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-15220
Radar rdar://problem/83411924
Original Reporter Jessy (JIRA User)
Type Bug
Environment

Swift 5.5

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Parser
Assignee None
Priority Medium

md5: 01e5013ed0613095e8de85e3c9e0c75e

Issue Description:

If a wrapping variable can be defined without explicit typing, or initializing with `wrappedValue`, it will require a semicolon for most following lines (e.g. ones that don't begin with `let` or `var`).

func localScope() {
  @propertyWrapper struct Wrapper {
    var wrappedValue = 0
  }

  @Wrapper var variable // Insert semicolon here to eliminate error.
  print(variable)
}
@typesanitizer
Copy link

@swift-ci create

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers parser Area → compiler: The legacy C++ parser property wrappers Feature: property wrappers
Projects
None yet
3 participants