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
When upgrading an existing project from Swift 3.0 to 3.1 some of my unit test started failing due to properties in an enum not being initialised via #file, #function, #line.
Observed outcome:
Enum properties initialised via #file, #function, #line are empty.
Expected outcome:
Enum properties initialised via #file, #function, #line contain the source location.
Swift3.1XCode8.3initialisationissuefile: ""function: ""
line: 0
Program ended with exit code: 0
Condition:
The problem only occurs, if the variable initialisedEnum is declared and initialised in the class. If the variable is declared and initialised outside the class or within the function run(), it works as expected. It also works, if the variable is declared in the class and initialised in a constructor.
Cheers
Martin
The text was updated successfully, but these errors were encountered:
Environment
Swift 3.1, Xcode 8.3 (8E162), macOS 10.12.4
Additional Detail from JIRA
md5: df4b14851de2e69520b917dc60d8d045
duplicates:
Issue Description:
Hi There
When upgrading an existing project from Swift 3.0 to 3.1 some of my unit test started failing due to properties in an enum not being initialised via #file, #function, #line.
Observed outcome:
Enum properties initialised via #file, #function, #line are empty.
Expected outcome:
Enum properties initialised via #file, #function, #line contain the source location.
Example code:
Condition:
The problem only occurs, if the variable
initialisedEnum
is declared and initialised in the class. If the variable is declared and initialised outside the class or within the functionrun()
, it works as expected. It also works, if the variable is declared in the class and initialised in a constructor.Cheers
Martin
The text was updated successfully, but these errors were encountered: