You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested on latest swift-3.0-preview-1 branch (e51c883), latest master branch (52de534), OS X 10.11.4
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug
Assignee
None
Priority
Medium
md5: 2c7a6b664acd2daaf353938274f7c36e
Issue Description:
A for-in loop iterating over an array of implicitly unwrapped optional type (e.g. [Int!]) will iterate forever, even though there are a finite number of elements in the array.
varfirstInt : Int!
varsecondInt : Int!
varthirdInt : Int!
firstInt = 10secondInt = 20thirdInt = 30letsomeArray = [firstInt, secondInt, thirdInt]
// Expected: prints three values// Actual: loops forever, prints 'nil' after the three values in the arrayforanObjectinsomeArray {
print(anObject)
}
The text was updated successfully, but these errors were encountered:
Reproducible on IBMs boxes running 3.0, but not on master anymore (not sure where exactly, but my guess would be 778a4ee). Looks like it was a problem with type inference and the new IUO restrictions.
Environment
Tested on latest swift-3.0-preview-1 branch (e51c883), latest master branch (52de534), OS X 10.11.4
Additional Detail from JIRA
md5: 2c7a6b664acd2daaf353938274f7c36e
Issue Description:
A for-in loop iterating over an array of implicitly unwrapped optional type (e.g. [Int!]) will iterate forever, even though there are a finite number of elements in the array.
The text was updated successfully, but these errors were encountered: