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
The following throws the compiler error "Variable used within its own initial value", and I can't see why it should.
The problem seems to be with the fact that the constant is named "string" and the func that I'm assigning to it from also starts with "string" (though the full name of the func is obviously "string(at:)"). Please ignore the functionality of the sample code; I've pared it down from a larger project that uses UIViews and IndexPaths instead of Strings and Ints.
Environment
Xcode 9 GM, Swift 4
Additional Detail from JIRA
md5: 4781d149d0eacf05febed6bfea54d200
duplicates:
relates to:
Issue Description:
The following throws the compiler error "Variable used within its own initial value", and I can't see why it should.
The problem seems to be with the fact that the constant is named "string" and the func that I'm assigning to it from also starts with "string" (though the full name of the func is obviously "string(at:)"). Please ignore the functionality of the sample code; I've pared it down from a larger project that uses UIViews and IndexPaths instead of Strings and Ints.
struct Foo {
{{ func bar() {}}
{{ let string = string(at: 2)}}
{{ private func string(at index: Int) -> String {}}
{{ return "Test"}}
{{ }}{{}}}
The text was updated successfully, but these errors were encountered: