[SR-10437] Compile time is long when expression adds a negative #52837
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
performance
type checker
Area → compiler: Semantic analysis
Attachment: Download
Environment
Swift 5.0, Xcode 10.2.
To find the source of long compile times, I enabled the following flags under "Other Swift Flags" in Build Settings:
-Xfrontend -warn-long-function-bodies=100
-Xfrontend -warn-long-expression-type-checking=100
Additional Detail from JIRA
md5: a88c4a9789ebea9517c32777b15bf095
Issue Description:
I have found a bug that increases compile times a great deal.
I saw long compile times when I used the negative operator in front
of a variable and added that variable. When I removed the negative
operator, and just subtracted the variable instead, compile times
returned to normal. The two screenshots show what happens.
The text was updated successfully, but these errors were encountered: