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-6273] Disallow unconstructible infinite value types #48823

Closed
jckarter opened this issue Nov 1, 2017 · 3 comments
Closed

[SR-6273] Disallow unconstructible infinite value types #48823

jckarter opened this issue Nov 1, 2017 · 3 comments
Assignees
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

Comments

@jckarter
Copy link
Member

jckarter commented Nov 1, 2017

Previous ID SR-6273
Radar rdar://problem/21926802
Original Reporter @jckarter
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, StarterBug
Assignee @AnthonyLatsis
Priority Medium

md5: 9ba68b3c815d542535d6d965fd591b35

Issue Description:

The type checker disallows value types with infinite storage, but not value types with indirected storage but which are still unconstructibly infinite. For example:

enum E {
  indirect case X(E)
}
@swift-ci
Copy link
Collaborator

Comment by Yuka Ezura (JIRA)

I tried to resolve this issue.
But while working on, I found we need to support some cases... (For example, the following codes)

// OK
enum E {
    indirect case x(Array<E>)
}
// OK
enum E {
    indirect case x(S)
}

struct S {
    let e: E?
}

Anyway, I will continue to think about this issue.

@AnthonyLatsis
Copy link
Collaborator

#16987

@AnthonyLatsis
Copy link
Collaborator

Made into a warning; not exhaustive for that reason – simple cases handled when the recursions are directly among the associated values.

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

No branches or pull requests

3 participants