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-14525] Swift memory conflict where it should not happen #56877

Open
swift-ci opened this issue Apr 25, 2021 · 1 comment
Open

[SR-14525] Swift memory conflict where it should not happen #56877

swift-ci opened this issue Apr 25, 2021 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-14525
Radar rdar://problem/77164398
Original Reporter SwiftyMe (JIRA User)
Type Bug

Attachment: Download

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

md5: 7ff38942e37b2d5dde312c94d27b4883

Issue Description:

In a generic class A:

class A<T:ModelType> {

...

T is constrained by:

protocol ModelType: AnyObject, ModelType1, ModelType2 {

    **func** description() -\> String

}

but this does not prevent T from being handled as a Struct value type.

Originally I posted this problem in stack overflow:

https://stackoverflow.com/questions/67233418/swift-memory-conflict-where-it-should-not-happen

Note, that I was not aware of the problem at that point, so the example code is a bit off. But discussion reveals the problem and the bug.

The attached SwiftUI project can be used to reproduce the bug.

@typesanitizer
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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
Projects
None yet
Development

No branches or pull requests

2 participants