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-13352] Array Shorthand notation while accessing a subtype of an array not incorrectly results in an error #55792

Open
swift-ci opened this issue Aug 6, 2020 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Aug 6, 2020

Previous ID SR-13352
Radar rdar://problem/67752256
Original Reporter DeskA (JIRA User)
Type Bug
Environment

Swift 5.1, but also reproducable on the 5.3

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

md5: a0b5c7fbfee5cfa532f94c907a80e994

Issue Description:

extension Array {
  struct Results {
     var count: Int = 1
  }
}

struct SomeStruct <T> {
  var items = [Int : .[T].Results]() // ERROR: Generic struct 'Dictionary' requires that 'Int.Type' conform to 'Hashable' 
}

See: https://forums.swift.org/t/dictionary-of-int-and-an-embedded-type-compile-error-when-using-the-shorthand-notation/39036

@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.
Projects
None yet
Development

No branches or pull requests

2 participants