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-13033] Seg fault with property wrapper and underscored variables #55478

Closed
mbrandonw opened this issue Jun 17, 2020 · 1 comment
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software type checker Area → compiler: Semantic analysis

Comments

@mbrandonw
Copy link
Contributor

Previous ID SR-13033
Radar None
Original Reporter @mbrandonw
Type Bug
Status Closed
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, TypeChecker
Assignee None
Priority Medium

md5: 9119ca03622a9241ce095ecc48332526

duplicates:

  • SR-12839 Underscore variable with same name as published var crashes compiler

Issue Description:

class Foo: ObservableObject {
  @Published var foo = 0
  var _foo = 0
}
@theblixguy
Copy link
Collaborator

This was fixed by #31915 on master and 5.3. You can verify using a development snapshot from swift.org:

/Users/spare/Desktop/test.swift:5:7: error: invalid redeclaration of synthesized property '_foo'
  var _foo = 0
      ^
/Users/spare/Desktop/test.swift:4:18: note: '_foo' synthesized for property wrapper backing storage
  @Published var foo = 0
                 ^

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
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 crash Bug: A crash, i.e., an abnormal termination of software type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

3 participants